小弟第一次javabean 代码如下:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<jsp:useBean id="FirstJavaBean" class="goldenberg.FirstJavaBean"/>
<jsp:setProperty name="FirstJavaBean" property="usname" value='<%=request.getParameter("usname") %>'/>
<jsp:setProperty name="FirstJavaBean" property="uspassword" value='<%=request.getParameter("uspassword") %>'/>
<jsp:getProperty name="FirstJavaBean" property="usname"/>
<jsp:getProperty name="FirstJavaBean" property="uspassword"/>
</body>
</html>
红颜色的地方出错. cannot be resolved to a type
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<jsp:useBean id="FirstJavaBean" class="goldenberg.FirstJavaBean"/>
<jsp:setProperty name="FirstJavaBean" property="usname" value='<%=request.getParameter("usname") %>'/>
<jsp:setProperty name="FirstJavaBean" property="uspassword" value='<%=request.getParameter("uspassword") %>'/>
<jsp:getProperty name="FirstJavaBean" property="usname"/>
<jsp:getProperty name="FirstJavaBean" property="uspassword"/>
</body>
</html>
红颜色的地方出错. cannot be resolved to a type
楼主【goldenbergtiger】截止到2008-07-14 17:05:36的历史汇总数据(不包括此帖):
发帖的总数量:8 发帖的总分数:160 每贴平均分数:20
回帖的总数量:6 得分贴总数量:1 回帖的得分率:16%
结贴的总数量:8 结贴的总分数:160
无满意结贴数:0 无满意结贴分:0
未结的帖子数:0 未结的总分数:0
结贴的百分比:100.00% 结分的百分比:100.00%
无满意结贴率:0.00 % 无满意结分率:0.00 %
敬礼!
pageEncoding="UTF-8"%>
<%@ page import="你要引的包"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here </title>
</head>
<body>
<jsp:useBean id="FirstJavaBean" class="goldenberg.FirstJavaBean"/>
<jsp:setProperty name="FirstJavaBean" property="usname" value=' <%=request.getParameter("usname") %>'/>
<jsp:setProperty name="FirstJavaBean" property="uspassword" value=' <%=request.getParameter("uspassword") %>'/>
<jsp:getProperty name="FirstJavaBean" property="usname"/>
<jsp:getProperty name="FirstJavaBean" property="uspassword"/>
</body>
</html>
我曾经遇到的问题是这么解决的.
如果不行就不知道怎么回事了
classs = "com.zhangkai.Test"
1.5以前如果是默认包好像不行。
区分大小写
class是指定到你的具体类的,你那是吗?