请教 哪里错拉??? 请你检查 /login.jsp ;其中你用了userBean 可能写错了东西;不然把代码发上来才能研究 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 java文件package com.chapter2;public class Login{ public String userName; public String password;public Login(){ this.userName=null; this.password=null;}public void setUserName(String s){ this.userName = s;}public String getUserName(){ return this.userName;}public void setPassword(String s){ this.password = s;}public String getPassword(){ return this.password;}}JSP 文件<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %><jsp:useBean id="login" class="com.chapter2.Login" scope="page"/><jsp:setProperty name="login" property="userName" param="userName"/><jsp:setProperty name="login" property="password" param="password"/><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>javabean</title></head><body><div align="center"><h2>用户登陆信息如下:</h2><p>用户名:<font color="#0099CC"><%=login.getUserName()%></font></p><p>密码:<font color="#0099CC"><%=login.getPassword()%></font></p></div></body></html> 如何用io写文件追加内容? 怎样能禁止 form 表单 get 方式提交的自动转义? 二级缓存的问题 Metro的Schema Validation出错 解决jsp中烦人的中文乱码 myeclipse生成影射文件的问题,急!!! struts 标签的问题!!!! weblogic8。1的小问题,挺麻烦 实体(cmp与bmp)ejb1.0与ejb2.0有什么区别??? java 程序员转 php 、 andriod 你会选哪一个 现在要用hibernate连接两个数据库(都是ORACLE),一个本地,一个远程的 一个关于随要码重复率的问题.
package com.chapter2;public class Login
{
public String userName;
public String password;
public Login()
{
this.userName=null;
this.password=null;
}
public void setUserName(String s)
{
this.userName = s;
}
public String getUserName()
{
return this.userName;
}
public void setPassword(String s)
{
this.password = s;
}
public String getPassword()
{
return this.password;
}
}JSP 文件
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<jsp:useBean id="login" class="com.chapter2.Login" scope="page"/>
<jsp:setProperty name="login" property="userName" param="userName"/>
<jsp:setProperty name="login" property="password" param="password"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>javabean</title>
</head><body>
<div align="center">
<h2>用户登陆信息如下:</h2>
<p>用户名:<font color="#0099CC"><%=login.getUserName()%></font></p>
<p>密码:<font color="#0099CC"><%=login.getPassword()%></font></p>
</div>
</body>
</html>