我有以下代码,当我在我的 TOMCAT 服务器上运行时,它给了我错误: jspbeanlogin/loginbean.jsp (line: 7, column: 0) useBean 类属性 logbean.LoginBean 的值无效。我做错了什么,我不知道。有人可以解释我可能会错过什么。谢谢你。:-)
<HTML>
<HEAD><TITLE>DataBase Search</TITLE></HEAD>
<BODY>
<%@ page language="Java" import="java.sql.*" %>
<jsp:useBean id="db" scope="request" class="logbean.LoginBean" >
<jsp:setProperty name="db" property="userName" value="<
%=request.getParameter(\"userName\")%>"/>
<jsp:setProperty name="db" property="password" value="<
%=request.getParameter(\"password\")%>"/>
</jsp:useBean>
<jsp:forward page="hello">
<jsp:param name="username" value="<%=db.getUserName()%>" />
<jsp:param name="password" value="<%=db.getPassword()%>" />
</jsp:forward>
</body>
</html>