File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 39535
    
  27
What is a "friendly URL" ?


Ping & DNS - updated with new look and Ping home screen widget
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: 39535
    
  27
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
 
Similar Threads
Tomcat on Linux
JForum nice urls (as on Java Ranch)
SEO friendly URLs with Struts
get parameter in Servlet in different way
Is there a mod_rewrite for Tomcat to make URLs SEO friendly?