关于允许javabean的问题 大哥bean不需要配置! 是不是你类路径不对啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可能是我类路径不对。我的虚拟目录是: d:\webAppTestBean.java在d:\webApp\WEB-INF\classes\TestBean.java调用的网页在d:\webApp\Test.jsp可是运行TestBean.jsp后总提示TestBean找不到 这样 你 在classes下加个包 在TestBean.java里定义一下编译后 在看看这样应该好用 我把d:\webApp添加如了ClassPath后,重起Tomcat,现在是这样的提示:org.apache.jasper.JasperException: For input string: "asdf" org.apache.jasper.runtime.JspRuntimeLibrary.internalIntrospecthelper(JspRuntimeLibrary.java:359) org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibrary.java:306) org.apache.jasper.runtime.JspRuntimeLibrary.introspect(JspRuntimeLibrary.java:284) org.apache.jsp.register_jsp._jspService(register_jsp.java:55) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)root cause org.apache.jasper.JasperException: For input string: "asdf" org.apache.jasper.runtime.JspRuntimeLibrary.convert(JspRuntimeLibrary.java:271) org.apache.jasper.runtime.JspRuntimeLibrary.internalIntrospecthelper(JspRuntimeLibrary.java:353) org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibrary.java:306) org.apache.jasper.runtime.JspRuntimeLibrary.introspect(JspRuntimeLibrary.java:284) org.apache.jsp.register_jsp._jspService(register_jsp.java:55) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)root cause java.lang.NumberFormatException: For input string: "asdf" java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) java.lang.Integer.parseInt(Integer.java:468) java.lang.Integer.<init>(Integer.java:609) org.apache.jasper.runtime.JspRuntimeLibrary.convert(JspRuntimeLibrary.java:253) org.apache.jasper.runtime.JspRuntimeLibrary.internalIntrospecthelper(JspRuntimeLibrary.java:353) org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibrary.java:306) org.apache.jasper.runtime.JspRuntimeLibrary.introspect(JspRuntimeLibrary.java:284) org.apache.jsp.register_jsp._jspService(register_jsp.java:55) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 好啊!你有QQ或者msn吗? 加个Package试试看:myclass.TestBean路径:d:\webApp\WEB-INF\classes\myclass\TestBean.java 晕都说发到你短信里了 msn:joyaga9524@hotmail 现在可以运行了,谢谢大家。我的源文件是:package myclass;public class TestBean{ private String userName; private String password; private int age; public void setUserName(String name) { this.userName=name; } public void setPassword(String password) { this.password=password; } public String getUserName() { return this.userName; } public String getPassword() { return password; } public setAge(int age) { this.age=age; } public int getAge() { return this.age; }}第一个错误的发生是我的ClassPath设置的不对。第二个错误是我在测试的时候最后一个参数应该用数字,而我用了字符串,所以产生了异常。现在好了,谢谢大家! 为什么ServletRequest的对象可以转换为HttpServletRequest对象呢 java获得mssql数据集的问题 JSP注册数据写入SQLserver2005报错, ibatis调用ORACLE函数的问题 Invalid character used in text string 怎么在linux下设置jdk的classpass路径? 老问题,从JSP页面传值到javabean的问题 求flex开发的工作流设计器源码 sp3 tomcat启动不报错但是没有成功 js问题! 如何判断get传的参数为空? 请问写jsp高手指教,怎么在<style></style>中对下拉框设置。
我的虚拟目录是: d:\webApp
TestBean.java在d:\webApp\WEB-INF\classes\TestBean.java
调用的网页在d:\webApp\Test.jsp可是运行TestBean.jsp后总提示TestBean找不到
org.apache.jasper.runtime.JspRuntimeLibrary.internalIntrospecthelper(JspRuntimeLibrary.java:359)
org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibrary.java:306)
org.apache.jasper.runtime.JspRuntimeLibrary.introspect(JspRuntimeLibrary.java:284)
org.apache.jsp.register_jsp._jspService(register_jsp.java:55)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause org.apache.jasper.JasperException: For input string: "asdf"
org.apache.jasper.runtime.JspRuntimeLibrary.convert(JspRuntimeLibrary.java:271)
org.apache.jasper.runtime.JspRuntimeLibrary.internalIntrospecthelper(JspRuntimeLibrary.java:353)
org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibrary.java:306)
org.apache.jasper.runtime.JspRuntimeLibrary.introspect(JspRuntimeLibrary.java:284)
org.apache.jsp.register_jsp._jspService(register_jsp.java:55)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause java.lang.NumberFormatException: For input string: "asdf"
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
java.lang.Integer.parseInt(Integer.java:468)
java.lang.Integer.<init>(Integer.java:609)
org.apache.jasper.runtime.JspRuntimeLibrary.convert(JspRuntimeLibrary.java:253)
org.apache.jasper.runtime.JspRuntimeLibrary.internalIntrospecthelper(JspRuntimeLibrary.java:353)
org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibrary.java:306)
org.apache.jasper.runtime.JspRuntimeLibrary.introspect(JspRuntimeLibrary.java:284)
org.apache.jsp.register_jsp._jspService(register_jsp.java:55)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
你有QQ或者msn吗?
myclass.TestBean路径:d:\webApp\WEB-INF\classes\myclass\TestBean.java
我的源文件是:
package myclass;
public class TestBean
{
private String userName;
private String password;
private int age; public void setUserName(String name)
{
this.userName=name;
}
public void setPassword(String password)
{
this.password=password;
}
public String getUserName()
{
return this.userName;
}
public String getPassword()
{
return password;
}
public setAge(int age)
{
this.age=age;
}
public int getAge()
{
return this.age;
}
}
第一个错误的发生是我的ClassPath设置的不对。
第二个错误是我在测试的时候最后一个参数应该用数字,而我用了字符串,所以产生了异常。现在好了,谢谢大家!