Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URLRewriteFilter for ROOT?

 
Michael Cropper
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64692
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make the web app the ROOT application and set up a "welcome file" to the servlet mapping.
 
Michael Cropper
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean setting up something like this?



Michael
 
Michael Cropper
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic