Changing the root context for a servlet in an IntelliJ IDEA project

I created two servlets that run when I use their url template, which is defined in my web.xml file.

For example, to start the first one, enter the following in a browser:

http://localhost:8080/XmlServletPath 

I want to find a way to run these servlets from a different root context, for example:

 http://localhost:8080/SimpleServletProject/XmlServletPath 

When I try the above URL, I get the following error:

 HTTP Status 404 - /SimpleServletProject/XmlServletPath type Status report message /SimpleServletProject/XmlServletPath description The requested resource is not available. 

PS: I am using Tomcat 7.0.35.

+4
source share
1 answer

You can specify the application context on the Tomcat Run / Debug Configuration Deployment tab:

context

+13
source

All Articles