通过tomcat文件配置web项目

1、tomcat7.x  -->  conf  -->  server.xml

2、增加项目路径(黑体字所示)

      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
        
      <Context path="/HJWebframe" docBase="C:/workspace/HJWebframe/WebRoot" debug="0" privileged="true" reloadable="true" />


        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />

      </Host>

3、startUp启动

4、利用http://127.0.0.1:8080/HJWebframe访问。

猜你喜欢

转载自blog.csdn.net/qq_37992560/article/details/83417010