*
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
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: 42263
    
  64
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: 42263
    
  64
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting Friendly URLs for applications in Tomcat