I am using Eclipse Java-EE and I’m trying to make a servlet from there. However, I see a problem with mapping url-pattern in web.xml, the tomcat server wont initialise when the value inside the url-mapping is not the same as the project name? Is there a way I can assign different url-mapping value apart for the project name? Thanks.
Share
for example your servlet definition is as below
Say, your application root context is “webapplication” and your server is running on localhost,port 8080. then you can access above servlet
http://localhost:8080/webapplication/servlet
if you are asking about Web Context root (webapplication in above example) then you can also change it. in eclipse, right click your project->
properties ->Web Project Setting and change name of your appplication in Context Root field.