URL: http://hostname.com/contextPath/servletPath/pathInfo JettyIf contextPath is not specified, the root context is used by default, and the path of the root context is "/". warName.warWithout XML IoC file:
WEB-INF/jetty-web.xml<Configureclass="org.eclipse.jetty.webapp.WebAppContext"> <Setname="contextPath">/test</Set> ... </Configure> TomcatIndividual <context> elements can be defined in a number of ways:
META-INF/context.xmlThere is a close relationship between context name, context path, context version and base file name:
For example:
Server.xmlIt is not recommended to add the <context> element in the conf/server.xml file, because this file can only be reloaded by restarting Tomcat, which affects the normal use of other WebAPPs. Default context.xmlTomcat has a default context element, which applies to all applications, but its priority is also the lowest, and all configurations can be overwritten by the application. There are two default context.xml files:
This is the end of this article about setting Context Path in Web Applications. For more information about setting Context Path in Web Applications, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Teach you how to build the vue3.0 project architecture step by step
>>: MySQL series 6 users and authorization
In fact, the three tables above all have three ro...
The multi-site feature of WordPress allows you to...
There are many reasons for slow query speed, the ...
Table of contents background What is tablespace f...
This article shares the specific code of js to im...
Server matching logic When Nginx decides which se...
Three MySQL instance processes are started on one...
1. Who is tomcat? 2. What can tomcat do? Tomcat i...
Some students said that they encountered the prob...
MySQL database is widely used, especially for JAV...
Note: This table is quoted from the W3School tuto...
Experimental environment: 1. Three CentOS 7 serve...
Table of contents Written in front Environment de...
Table of contents Preface 1. insert ignore into 2...
Table of contents 1. Original Definition 2. JS op...