15:org.apache.struts2.views.jsp.ActionTag 16:JSP 17:18:19:executeResult Server: Resin/3.1.4a Content-Type: text/html Transfer-Encoding: chunked Date: Sat, 30 Apr 2016 09:03:41 GMT 08d4
500 /dlepas/pw_licenseApplyCheck/countyCheck/auditSuccess.jsp:6: jar:file:/D:/dqz/resin-pro-3.1.4a/webapps/ROOT/WEB-INF/lib/struts2-core-2.3.15.3.jar!/META-INF/struts-tags.tld:17: java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo.(Ljava/lang/String;ZLjava/lang/String;ZZLjava/lang/String;ZZLjava/lang/String;Ljava/lang/String;)V 15: org.apache.struts2.views.jsp.ActionTag 16: JSP 17: 18: 19: executeResult
java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo
java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo.<init>(Ljava/lang/String;ZLjava/lang/String;ZZ)V
org.apache.jasper.compiler.TagLibraryInfoImpl.createAttribute(TagLibraryInfoImpl.java:568)
org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:401)
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:248)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:162)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
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:853)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
导致以上原因的是因为javax.servlet.jsp.tagext.TagAttributeInfo有冲突
当前classpath中有两个version的javax.servlet.jsp.tagext.TagAttributeInfo class,一个在servlet.jar另一个在jsp-api.jar中。 jsp-api.jar的那个是好用的,它只包含javax\servlet\jsp这个包,而servlet.jar中也包含它,同时包含servlet需要的关键包。所以在classpath中jsp-api.jar要比servlet.jar先被reference。
另外在jboss3.2.*之后的自己带的lib中已经将javax\servlet\jsp从servlet.jar中分开了,分别是javax.servlet.jar(jsp-api.jar)和javax.servlet.jsp.jar(serlvet-api.jar).