过来看看,jsp (50分)

  • 主题发起人 主题发起人 向你学习
  • 开始时间 开始时间

向你学习

Unregistered / Unconfirmed
GUEST, unregistred user!
这是我的login.jsp
<%@ page contentType="text/html;
charset=GB2312" %>
<html>
<head>
<title>
login
</title>
</head>
<jsp:useBean id="loginBeanId" scope="session" class="jspstudy.loginBean" />
<jsp:setProperty name="loginBeanId" property="loginName" param="tbxName" />
<jsp:setProperty name="loginBeanId" property="password"/>
<body>
<h1>
JBuilder Generated JSP
</h1>
your name is :<jsp:getProperty name="loginBeanId" property="login" />
your password is <jsp:getProperty name="loginBeanId" property="password"/>
</body>
</html>
这是loginBean
package jspstudy;
public class loginBean
{
private String Name = "";
private String Pwd="";
public loginBean()
{
}
//Access sample property
public void setLoginName(String name)
{
this.Name=name;
}
public void setPassword(String pwd)
{
this.Pwd=pwd;
}
//Access sample property
public String getLoginName()
{
return this.Name;
}
public String getPassword()
{
return this.Pwd;
}
}
这是出错消息
"login.jsp": org.apache.jasper.JasperException: Cannot find any information on property 'login' in a bean of type 'jspstudy.loginBean'
快一个小时了,请帮忙,是不是太简单了,不好意思,路径好像不对,但实在找不到在哪
 
你把loginBean放在哪里了?!
 
你用的是什么服务器?javabean放的位置对吗?
 
root/jspstudy/defaultroot/login.jsp
root/jspstudy/defaultroot/jspstudy/loginbean.class
我也考了一个到
root/jspstudy/defaultroot/下,也不行,谢谢了
服务器tomcat4
 
your name is :<jsp:getProperty name="loginBeanId" property="login" />
改成
your name is :<jsp:getProperty name="loginBeanId" property="loginName" />
 
谢谢,在jb里通过了,但为什么在tomcat下不行
 
那就还是你的Tomcat的设置问题或者是文件的路径问题,等一下,我再看看,
对了,你怎么给我留言的呢?
 
现在还是那个错误消息吗?
 
不是那个消息了,tomcat运行别的.jsp好用(刚学,不太复杂,只是.jsp文件),
不知道为什么,谢谢
 
那你把错误贴出来,
对了,老兄,如何给别人留言?!
 
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
呼叫在线富翁上,那个电的图标就是
 
是不是在JB在编的东西,在TOMCAT环境下运行还要配置,
 
呵呵~~写错了
 
可以了吗?
 
我已经试过了,好像是你的tomcat有问题,我用你的程序没问题,我是用的weblogic6.1
 
接受答案了.
 
后退
顶部