日期:2014-05-17  浏览次数:20797 次

jsp项目本地正常,放上服务器后出错
本人学习jsp不足一月,囧~老板各种push中,亲们帮帮忙啊~
用Netbeans IDE写的,本地完全正常,放上服务器后首页还好,第二页调用bean的地方就报错了,以下是错误信息:
type Exception report

message /farp/web/doLogin.jsp (line: 17, column: 0) The value for the useBean class attribute DBConn.newscon is invalid.

description The server encountered an internal error (/farp/web/doLogin.jsp (line: 17, column: 0) The value for the useBean class attribute DBConn.newscon is invalid.) that prevented it from fulfilling this request.

exception 

org.apache.jasper.JasperException: /farp/web/doLogin.jsp (line: 17, column: 0) The value for the useBean class attribute DBConn.newscon is invalid.
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:149)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1234)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1182)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434)
org.apache.jasper.compiler.Node$Root.accept(Node.java:475)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
org.apache.jasper.compiler.Generator.generate(Generator.java:3490)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:250)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

就是这样,喵~

------解决方案--------------------
用远程debug调试
------解决方案--------------------
你应该把那个报错的jsp页面贴上来,问题应该不大。
确保一下
1 你的类是否有无参构造
2 类的包名是否添上
3 你的那个啥newscon是静态方法吗?是的话貌似没必要用<jsp:userbean/>
------解决方案--------------------
你应该是某个Bean有问题,建议把问题贴详细点
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.aiyiweb.com/java-web/317.html