2016-09-23 59 views
0

我在tomcat中手動解壓應用程序戰爭,因爲我在$ CATALINA/conf/Catalina/host/ROOT.xml中指定應用程序的上下文。文檔庫在這裏指定,手動解壓tomcat中的戰爭問題

<?xml version="1.0"?> 
    <Context 
    path="" 
    docBase="/opt/tomcat/tc3/webapps/TC3" 
    reloadable="true" 
    /> 

在同一場戰爭中被Tomcat解壓,我看不出有什麼問題,但是當我打開包裝使用手動unzip命令,我碰到下面碧玉問題,

org.apache.jasper.JasperException: Unable to find taglib "html" for URI: /WEB-INF/struts-html.tld 
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55) 
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:293) 
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:80) 
at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:176) 
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:434) 
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492) 
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1448) 
at org.apache.jasper.compiler.Parser.parse(Parser.java:145) 
at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:244) 
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:105) 
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:201) 
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:372) 
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:349) 
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:333) 
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:600) 
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:368) 
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) 
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) 
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) 
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) 
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108) 
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522) 
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) 
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) 
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620) 
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) 
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) 
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110) 
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) 
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785) 
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425) 
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) 
at java.lang.Thread.run(Thread.java:745) 

所以很明顯,這個問題是因爲手動解包戰爭VS tomcat解包戰爭的方式。 WAR如何手動解壓縮,或者有沒有辦法在指定docBase和上下文路徑的同時使tomcat解包?

+0

上述通常會在appBase/docBase屬性相對於/絕對值爲缺省值時出現問題。首先刪除上下文聲明,然後直接解壓縮webapps/目錄下的war文件,看看你是否仍然收到錯誤,最好是重新安裝Tomcat。 – Ironluca

+0

我試過新鮮的裝置來排除這個,但那並沒有鍛鍊。下面是我在server.xml中輸入的內容,

+0

當我說乾淨的時候,的Tomcat,沒有修改任何配置文件,在你的情況下,sever.xml被修改。 – Ironluca

回答

0

我有這個工作,有不同的路徑爲appBase & docBase。 docBase包含手動分解我的應用程序的目錄的路徑。

希望它可以幫助別人。

0

我已經將手動爆炸應用程序進行了外化。我將它保存在/ opt/test/TC3位置,並在CONFIG_BASE中進行更改以將docBase指向此位置。

但這似乎並沒有解決問題。有沒有辦法在指定上下文時使用autoDeploy?