错误:/index.jsp(13,0) The value for the useBean class attribute com.d.UserInfo is invalid. 求解 5
<%@pagelanguage="java"contentType="text/html;charset=UTF-8"pageEncoding="UTF-8"%><%@t...
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page import="com.d.*" %>
<%-- <%@ page import="com.d.UserInfo" %> --%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录</title>
</head>
<body>
<jsp:useBean id="userInfo" class="com.d.UserInfo"></jsp:useBean>
<c:set target="${userInfo }" property="name">廖伟亮</c:set>
<br>
<c:out value="UserInfo的属性为:${userInfo.name }"></c:out>
</body>
</html> 展开
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page import="com.d.*" %>
<%-- <%@ page import="com.d.UserInfo" %> --%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录</title>
</head>
<body>
<jsp:useBean id="userInfo" class="com.d.UserInfo"></jsp:useBean>
<c:set target="${userInfo }" property="name">廖伟亮</c:set>
<br>
<c:out value="UserInfo的属性为:${userInfo.name }"></c:out>
</body>
</html> 展开
1个回答
2014-12-13
展开全部
com.d.UserInfo
这个类生成了.class? 放成正确的目录里面了? WEB-INF\classes\com\d\UserInfo.class
这个类生成了.class? 放成正确的目录里面了? WEB-INF\classes\com\d\UserInfo.class
追问
一定放在WEB-INF\里面吗?我是放在了src/com.d这个包里面了
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询