search

Home  >  Q&A  >  body text

Can't omit project name when deploying web project?

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. #

天蓬老师天蓬老师2748 days ago850

reply all(1)I'll reply

  • 学习ing

    学习ing2017-06-12 09:21:58

    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

    reply
    0
  • Cancelreply