服务器:resin-3.0.28 支持JSTL1.1
运行JSTL2.0时,会报如下异常,但页面可以显示:
com.caucho.jsp.JspLineParseException: jar:file:/D:/soft/resin-3.0.28/webapps/WEB-INF/lib/jstl-1.2.jar!/META-INF/c.tld:6: <taglib xmlns="http://java.sun.com/xml/ns/javaee"> is an unexpected top-level tag.
<jsp12:taglib xmlns:jsp12="http://java.sun.com/JSP/TagLibraryDescriptor">,
<taglib xmlns="http://java.sun.com/xml/ns/j2ee"> or
<taglib xmlns=""> are expected.
Syntax: (<taglib> | (<taglib> | <jsp12:taglib>) | <jsp12:taglib> | <taglib>)
这是因为resin-3.0.28不支持JSTL2.0
================================================================
com.caucho.jsp.JspLineParseException: jar:file:/D:/soft/resin-3.0.28/webapps/WEB-INF/lib/jstl-1.2.jar!/META-INF/c.tld:6: <taglib xmlns="http://java.sun.com/xml/ns/javaee"> is an unexpected top-level tag.
<jsp12:taglib xmlns:jsp12="http://java.sun.com/JSP/TagLibraryDescriptor">,
<taglib xmlns="http://java.sun.com/xml/ns/j2ee"> or
<taglib xmlns=""> are expected.
Syntax: (<taglib> | (<taglib> | <jsp12:taglib>) | <jsp12:taglib> | <taglib>)
at com.caucho.jsp.TldManager.loadJarTlds(TldManager.java:408)
at com.caucho.jsp.TldManager.init(TldManager.java:196)
at com.caucho.jsp.TldManager.parseTld(TldManager.java:434)
at com.caucho.jsp.TaglibManager.readTaglib(TaglibManager.java:225)
at com.caucho.jsp.TaglibManager.getTaglib(TaglibManager.java:172)
at com.caucho.jsp.ParseTagManager.addTaglib(ParseTagManager.java:258)
at com.caucho.jsp.JspParser.processTaglib(JspParser.java:1655)
at com.caucho.jsp.JspParser.processTaglibDirective(JspParser.java:1629)
at com.caucho.jsp.JspParser.parseDirective(JspParser.java:1159)
at com.caucho.jsp.JspParser.parseScriptlet(JspParser.java:1033)
at com.caucho.jsp.JspParser.parseNode(JspParser.java:417)
at com.caucho.jsp.JspParser.parseJsp(JspParser.java:328)
at com.caucho.jsp.JspParser.parse(JspParser.java:252)
at com.caucho.jsp.JspCompilerInstance.generate(JspCompilerInstance.java:466)
at com.caucho.jsp.JspCompilerInstance.compile(JspCompilerInstance.java:373)
at com.caucho.jsp.JspManager.compile(JspManager.java:233)
at com.caucho.jsp.JspManager.createPage(JspManager.java:177)
at com.caucho.jsp.JspManager.createPage(JspManager.java:157)
at com.caucho.jsp.PageManager.getPage(PageManager.java:248)
at com.caucho.jsp.PageManager.getPage(PageManager.java:166)
at com.caucho.jsp.QServlet.getSubPage(QServlet.java:292)
at com.caucho.jsp.QServlet.getPage(QServlet.java:210)
at com.caucho.server.dispatch.PageFilterChain.compilePage(PageFilterChain.java:206)
at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:133)
at com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:115)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
at com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:277)
at com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:106)
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:239)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:106)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:274)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:514)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:527)
at com.caucho.util.ThreadPool.run(ThreadPool.java:449)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.caucho.xml.XmlParseException: jar:file:/D:/soft/resin-3.0.28/webapps/WEB-INF/lib/jstl-1.2.jar!/META-INF/c.tld:6: <taglib xmlns="http://java.sun.com/xml/ns/javaee"> is an unexpected top-level tag.
<jsp12:taglib xmlns:jsp12="http://java.sun.com/JSP/TagLibraryDescriptor">,
<taglib xmlns="http://java.sun.com/xml/ns/j2ee"> or
<taglib xmlns=""> are expected.
Syntax: (<taglib> | (<taglib> | <jsp12:taglib>) | <jsp12:taglib> | <taglib>)
at com.caucho.xml.DOMBuilder.error(DOMBuilder.java:600)
at com.caucho.xml.DOMBuilder.error(DOMBuilder.java:574)
at com.caucho.relaxng.VerifierImpl.error(VerifierImpl.java:77)
at com.caucho.relaxng.VerifierHandlerImpl.error(VerifierHandlerImpl.java:347)
at com.caucho.relaxng.VerifierHandlerImpl.error(VerifierHandlerImpl.java:361)
at com.caucho.relaxng.VerifierHandlerImpl.startElement(VerifierHandlerImpl.java:220)
at com.caucho.relaxng.VerifierFilter.startElement(VerifierFilter.java:134)
at com.caucho.xml.XmlParser.addElement(XmlParser.java:2601)
at com.caucho.xml.XmlParser.parseElement(XmlParser.java:649)
at com.caucho.xml.XmlParser.parseNode(XmlParser.java:367)
at com.caucho.xml.XmlParser.parseInt(XmlParser.java:242)
at com.caucho.xml.AbstractParser.parse(AbstractParser.java:633)
at com.caucho.relaxng.VerifierFilter.parse(VerifierFilter.java:83)
at com.caucho.config.Config.parseDocument(Config.java:394)
at com.caucho.config.Config.configure(Config.java:212)
at com.caucho.jsp.TldManager.parseTldPreload(TldManager.java:668)
at com.caucho.jsp.TldManager.parseTldPreload(TldManager.java:630)
at com.caucho.jsp.TldManager.loadJarTlds(TldManager.java:401)
... 47 more
这是因为页面引用的tld的uri写错了,造成读tld文件失败