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 Android Security Essentials Live Lessons this week in the Android 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: 41155
    
  45
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: 41155
    
  45
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
SEO friendly URLs with Struts
get parameter in Servlet in different way
Is there a mod_rewrite for Tomcat to make URLs SEO friendly?
JForum nice urls (as on Java Ranch)