Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change root context for a servlet in an IntelliJ IDEA project

I have created two servlets that run when I use their url-pattern that is defined in my web.xml file.

For example, to run the first one I type the following in my 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 now I am getting 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.

like image 363
skiabox Avatar asked Mar 19 '13 19:03

skiabox


1 Answers

Application context can be specified in the Deployment tab of the Tomcat Run/Debug configuration:

context

like image 79
CrazyCoder Avatar answered Sep 28 '22 05:09

CrazyCoder