已发布的jsp项目如何在本地展示
Posted 千里泽国
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了已发布的jsp项目如何在本地展示相关的知识,希望对你有一定的参考价值。
已发布的项目可以放到tomcat 安装目录下的webapps/下面,但是有时候我们的目录已经放好了,所在要加映射过去。
1, 到tomcat/conf/下,打开server.xml
2, 找到
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
3, 从这里可以看,默认目录是在webapps, 修改目录指向,添加语名:
<Context docBase="你项目的绝对地址" path="" reloadable="true"/>
4, 完整的host
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
<Context docBase="******"path="" reloadable="true"/>
5, 重启tomcat, 先shutup, 再startup
以上是关于已发布的jsp项目如何在本地展示的主要内容,如果未能解决你的问题,请参考以下文章