用eclipse编写jsp 高手帮个忙 总是The value for the useBean class attribute wjj.user is invalid.

来源:百度知道 编辑:UC知道 时间:2024/07/05 05:16:41
login.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!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>Insert title here</title>
</head>
<body>
<form action="output.jsp">
用户名:<input type="text" name="user">
<br>
密码:<input type="password" name="passwd">
<br>
<input type="submit" value="提交">
<input type="reset" value="重置">
</form>

楼上的你是不懂装懂还是没有认真看问题呢
<jsp:useBean id="userbean" class="wjj.user" scope="session"/>

哦!在你的output.jsp 这个文件的头文件里面,你要导入你建立的Bean类
你没导入,JSP就搜索不到了!
在JSP的头文件<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
下面加上
<%@import ="javaBean.java Resource:src.wjj.user"%>
就可以了

<form action="output.jsp">有这种写法吗? 就是action里跳转到jsp的...