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

HTTP Status 500 description The server encountered an internal error () that prevented it from fulfilling this request.java.lang.NoSuchMethodError


在IE下使用Tomcat 6.0 执行JSP档时发生下述错误:

HTTP Status 500 -


type Exception report

message

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

exception

javax.servlet.ServletException: java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:275)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
	org.apache.jsp.CH4.ErrorPage_jsp._jspInit(ErrorPage_jsp.java:28)
	org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
	org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 

-------------------------------------------------------------------------------------

请依照下述解决方式来问题排除,

1.开启 {Tomcat_Install}lib 数据夹

  开启 {Tomcat_Install}webapps网站WEB-INFlib 数据夹

2.对照两个数据夹内是否有重复的jar档,若有的话则删除

  {Tomcat_Install}webapps网站数据夹WEB-INFlib 数据夹内的jar档。

  (我在此数据夹发现重复的文件为jsp-api.jar和servlet-api.jar)

3.重新启动Tomcat,再将jsp网页开启将正常显示。

参考或是复制语法时,别忘了留个言喔 ^ ^ ~