当前位置: 代码迷 >> Java Web开发 >> JSP报奇怪的异常
  详细解决方案

JSP报奇怪的异常

热度:125   发布时间:2016-04-17 14:35:05.0
JSP报奇怪的错误
是这样的,我运行JSP环境是这样的:Apache   Tomcat/5.0.28、j2sdk1.4.2_04,SQL   Server   2000、Microsoft   SQL   Server   2000   Driver   for   JDBC并且将其中的三个文件(msbase.jar、msutil.jar、mssqlserver.jar)复制到\Tomcat   5.0\common\lib下,然后运行JSP,结果报错

description   The   server   encountered   an   internal   error   ()   that   prevented   it   from   fulfilling   this   request.

exception  

javax.servlet.ServletException:   javax/servlet/http/HttpServletRequest
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.install_jsp._jspService(install_jsp.java:1252)
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.NoClassDefFoundError:   javax/servlet/http/HttpServletRequest
net.acai.util.ParamUtil.getString(ParamUtil.java:16)
net.acai.util.ParamUtil.getString(ParamUtil.java:23)
org.apache.jsp.install_jsp._jspService(install_jsp.java:74)
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)


note   The   full   stack   trace   of   the   root   cause   is   available   in   the   Apache   Tomcat/5.0.28   logs.
不知道是什么原因,我的环境变量也设定过啊,与servlet有关吗?哪又该怎么设定呢?我用的tomcat   5.0.28,
有没有谁知道可能的原因,谢谢你们?困扰我一段时间了。




------解决方案--------------------
程序源码也贴出来吧.
------解决方案--------------------
错误信息是在说找不到ParamUtil的方法 ..看看import里面是不是写错了
------解决方案--------------------
楼主看你报的异常了吗,NoClassDefFoundError 仔细看看 是不是有包没导入?还是用了根本没定义的类?
------解决方案--------------------
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
找不到:javax.servlet.http.HttpServletRequest类。
------解决方案--------------------
检查一下你的servlet.jar jsper-runtime.jar jsper-compile.jar是否导入
------解决方案--------------------
环境变量里有加servlet.java吗?
代码迷推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.daimami.com/search?q=317
  相关解决方案