web.xml 原配置
-
<taglib>
-
<taglib-uri>struts</taglib-uri>
-
<taglib-location>
-
/WEB-INF/lib/struts2-core-2.0.14.jar
-
</taglib-location>
-
</taglib>
启动tomcat7 出现:
-
2015-2-27 16:55:07 org.apache.tomcat.util.digester.Digester fatalError
-
严重: Parse Fatal Error at line 1 column 1: Content is not allowed in prolog.
-
org.xml.sax.SAXParseException: Content is not allowed in prolog.
-
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
-
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
-
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
-
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1411)
-
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1038)
-
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
-
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
-
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
-
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
-
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
-
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
-
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
-
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
-
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
-
at org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:540)
-
at org.apache.catalina.startup.TldConfig.tldScanWebXml(TldConfig.java:349)
-
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:262)
-
at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:565)
-
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
-
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
-
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5380)
-
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
-
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
-
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
-
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
-
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
-
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
-
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
-
at java.lang.Thread.run(Thread.java:619)
-
2015-2-27 16:55:07 org.apache.catalina.startup.TldConfig tldScanWebXml
-
警告: Failed to process TLD with path [/WEB-INF/lib/struts2-core-2.0.14.jar] and URI [struts]
-
java.io.IOException: org.xml.sax.SAXParseException: Content is not allowed in prolog.
-
at org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:543)
-
at org.apache.catalina.startup.TldConfig.tldScanWebXml(TldConfig.java:349)
-
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:262)
-
at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:565)
-
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
-
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
-
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5380)
-
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
-
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
-
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
-
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
-
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
-
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
-
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
-
at java.lang.Thread.run(Thread.java:619)
-
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
-
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
-
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
-
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
-
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1411)
-
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1038)
-
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
-
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
-
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
-
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
-
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
-
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
-
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
-
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
-
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
-
at org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:540)
-
... 14 more
-
2015-2-27 16:55:07 org.apache.catalina.startup.TaglibUriRule bod
解压 struct2 core 包。拷贝struts2-core-2.0.14\META-INF\struts-tags.tld 到web-inf\tld 下
更改web.xml:
-
<taglib>
-
<taglib-uri>struts</taglib-uri>
-
<taglib-location>
-
/WEB-INF/tld/struts-tags.tld
-
</taglib-location>
-
</taglib>
重新启动解决。
阅读(4538) | 评论(0) | 转发(0) |