This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes remove the war name from the urls in tomcat5.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "remove the war name from the urls in tomcat5.5" Watch "remove the war name from the urls in tomcat5.5" New topic
Author

remove the war name from the urls in tomcat5.5

ranjo Gupta
Greenhorn

Joined: May 03, 2010
Posts: 3
Hi All,
I want to change the url of my application which is deployed on tomcat5.5

warfile deployed in webapps is :- DBservice.war

and the present url 's are
1. http://localhost:8080/DBService/health.
2.http://localhost:8080/DBServeice/lb.

New URLs I want are
1. http://localhost:8080/health.
2.http://localhost:8080/lb.

if you see the difference in both the url set is the absence of war file name from the url. please suggest how it can be achieved
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39535
    
  27
Package the web app as ROOT.war (and make sure that there is no ROOT web app to begin with in the web apps directory).


Ping & DNS - updated with new look and Ping home screen widget
ranjo Gupta
Greenhorn

Joined: May 03, 2010
Posts: 3
thanks for the quick reply, but there is already a file by the name ROOT exists in webapps and it is been used , please suggest some other alternative
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39535
    
  27
Can you merge both web apps together into a single ROOT web app?
ranjo Gupta
Greenhorn

Joined: May 03, 2010
Posts: 3
I afraid no.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

In that case, you can't remove the contextPath.
How else would the server route requests to the correct app?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: remove the war name from the urls in tomcat5.5
 
Similar Threads
How to deploy a simple Web App with no EJB
Hanuman Deshmukh Chapter 12 Question..
Remote Appln Deployment in Tomcat4
JBoss - configuration & deployment questions
how to install tomcat 5.5 in windows vista