tomcat中server.xml配置对项目的影响!5.5

host下配置context,其中有path和docbase2个属性,我将path设置为/ 运行项目打开浏览器查看源码显示path=request.getContextPath();是一个斜杠,所以这个是不对的,果断设置为空。设置为空就默认是得到项目的名!即WEB-INF的父目录名!

 

看到的朋友能不能帮我解决一个问题:

我这个项目2个地方部署,一个在万网,一个是自己装的VPS中,万网一切正常,但是VPS中的部署好后也可以访问,打开首页的什么都没问题,但是老是报一个奇怪的异常,经查看好像是无法获取session,例如验证码是存放在session里的,然后action里从session中拿到该值,却为空!每次都是这样,本地、万网,服务器都没有问题,请问是什么问题!

错误代码:

2011-2-21 16:23:24  org.apache.jasper.compiler.TldLocationsCache processWebDotXml
警告:  Internal Error: File /WEB-INF/web.xml not found
2011-2-21 16:23:24 org.apache.catalina.core.StandardWrapperValve invoke
严重:  Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: File "/WEB-INF/struts-tags.tld" not found
        at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
        at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
        at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
        at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:160)
        at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:430)
        at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:499)
        at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1558)
        at org.apache.jasper.compiler.Parser.parse(Parser.java:130)
        at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:245)
        at org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
        at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:161)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:326)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:307)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
        at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:565)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:309)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
        at java.lang.Thread.run(Thread.java:595)
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值