aspose file tools*
The moose likes Servlets and the fly likes URLRewriteFilter for ROOT? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "URLRewriteFilter for ROOT?" Watch "URLRewriteFilter for ROOT?" New topic
Author

URLRewriteFilter for ROOT?

Michael Cropper
Ranch Hand

Joined: Sep 30, 2009
Posts: 137
Hi, I have been looking around on how to use URLRewriteFilter for how I can map "http://localhost/" to a servlet. Either I am missing something blindingly obvious, or this isn't as simple as I was hoping.

Does anyone know how to map the ROOT of a web application to a servlet?

I tried doing this in web.xml, although when using "/" as the url-pattern this throws everything through the servlet including images and all.

Thanks
Michael
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61769
    
  67

Make the web app the ROOT application and set up a "welcome file" to the servlet mapping.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Michael Cropper
Ranch Hand

Joined: Sep 30, 2009
Posts: 137
Do you mean setting up something like this?



Michael
Michael Cropper
Ranch Hand

Joined: Sep 30, 2009
Posts: 137
This has solved the issue.

I will post the other question in a new topic to stop things getting confusing.

Thanks for the help

Michael
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: URLRewriteFilter for ROOT?