导入web工程到myeclipse,报错Failed to load or instantiate TagExtraInfo

使用的是tomcat6,和jdk1.6.

org.apache.jasper.JasperException: /WEB-INF/jsp/common/alert.jsp(1,1) Failed to load or 
instantiate TagExtraInfo class: com.opensymphony.module.sitemesh
.taglib.decorator.UsePageTEI
	org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
	org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
	org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
	org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:300)
	org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:333)
	org.apache.jasper.compiler.Parser.parseDirective(Parser.java:442)
	org.apache.jasper.compiler.Parser.parseElements(Parser.java:1399)
	org.apache.jasper.compiler.Parser.parse(Parser.java:130)
	org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255)
	org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:185)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:157)
	org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
	com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277)
	org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
	org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:498)
	org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
	org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
	dwz.framework.adapter.web.filter.SessionValidateFilter.doFilter(SessionValidateFilter.java:86)
	dwz.framework.adapter.web.filter.EncodingFilter.doFilter(EncodingFilter.java:30)
	org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)

出现问题之后,检查了工程编译j2ee编译的版本级别是1.6.

找了半天,百度结果说是jsp-api.jar和servlet-api.jar在tomcat的lib和工程的lib下面同时存在,冲突了。
要删掉一个。

删除工程下面的lib里面的还不行。最后是tomcat里面的servlet.jar替换了web工程下面的同名文件
(tomcat里面的和web下面的大小不一样),就可以了。


你可能感兴趣的:(MyEclipse)