Can't omit project name when deploying web project?
天蓬老师
天蓬老师 2017-06-12 09:19:58
0
1
799

The project name still cannot be omitted when entering the domain name.
Everything that should be configured is also configured, even changing the project name to ROOT is of no use,

Others say that my configuration is correct, but it just doesn’t work
It feels like the context configured in the server. #

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
学习ing

1. Place the project outside of webapps
2. Add the <Context node to the Host node of server.xml

1.tomcat7 directory map, create a new www directory, and put the project into the www directory

2.Configure server.xml

Find the <Host> node

  <Host name="localhost"  appBase="webapps" unpackWARs="true" autoDeploy="true">
        <Context path="" docBase="E:\Java\tomcat7\www\EIS-Portal" reloadable="false"/>
         <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>

The red part is for adding content, and the blue part is the project name (folder name)
path is ""
docBase is the absolute path of the project, such as Windows is E:Javatomcat7wwwEIS-Portal and linux is /www/EIS-Portal

Page renderings

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!