This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Setting Friendly URLs for applications in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Setting Friendly URLs for applications in Tomcat" Watch "Setting Friendly URLs for applications in Tomcat" New topic
Author

Setting Friendly URLs for applications in Tomcat

Ramaswamy Srinivasan
Ranch Hand

Joined: Aug 31, 2004
Posts: 295
Dear All,

Can somebody please tell me, how do we set friendly URLs to the applications running on our Tomcat server?

Thanks in advance.

Cheers,
Ram.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41629
    
  55
What is a "friendly URL" ?


Ping & DNS - my free Android networking tools app
Ramaswamy Srinivasan
Ranch Hand

Joined: Aug 31, 2004
Posts: 295
Hi Ulf,

Sorry, that I should made it a bit more elaborate.

We have an application, deployed in a server....say for example it takes the URL "http://localhost:8080/myworld/utils/MyUtils.jsp.

I would like to access the application, just by typing "myutils".

Is there any way, we can achieve this?

Cheers,
Ram.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41629
    
  55
Using <servlet-mapping> in your web.xml you can define a servlet that listens to "myutils", which then forwards to the JSP.
Ramaswamy Srinivasan
Ranch Hand

Joined: Aug 31, 2004
Posts: 295
Many a thanks Ulf, shall try this and let you know
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Setting Friendly URLs for applications in Tomcat