Initial access to local project input URL: Http://localhost:8080/LinkST
Change the Tomcat port number
The Tomcat port number defaults to 8080 and opens tomcat–>conf–> Server.xml server configuration file, directly search 8080, in 68 rows of connector, change port to the port you want to take, such as to remove the port number, directly change the port number to 80.
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /><Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
Enter now: Http://localhost:80/LinkST or Http://localhost/LinkST can be accessed
To remove the Tomcat project name
Similarly, open the Tomcat–>conf–>server.xml server configuration file and locate the bottom of the configuration file in host.
<Host name="localhost"appBase="WebApps"unpackwars= "true" Autodeploy="true"> <!--can add code here -- <Valve className="Org.apache.catalina.valves.AccessLogValve" Directory ="Logs"prefix= "localhost_access_log" suffix=". txt " Pattern="%h%l%u%t "%r" %s%b " /> </Host>
In the code hint, add the following code, where Docbase is the project file you put in Tomcat, which is usually found in Tomcat–>webapp.
<Context docBase="D:\Java\Apache Software Foundation\Tomcat 8.0\webapps\LinkST
Enter now: http://localhost or Http://localhost/LinkST or Http://localhost:80/LinkST can be accessed
Success
Successful removal of Tomcat project name and port number: http://localhost
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Tomcat removes the project name and port number