This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet URL Aliasing (Apache + TomCat)  RSS feed

 
Thomas Goorden
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Here's a problem I've found some references too, but no conclusive answer:
I would like to have my Apache webserver forward specific requests to TomCat, not neccesarily throurgh the standard /servlet mapping.
In essence I would like
http://www.server.com/ServletName
to behave the same as
http://www.server.com/servlet/ServletName
I know (and succeeded) in doing this through:

in the Apache cofiguration (using mod_jk), which, in combination with

In the web.xml file.
BUT, and here's the catch, suppose I want to do:
http://www.server.com/ServletName/hello.html
(this could be *really* good for hiding your implementation from users, as well as other nifty path-related advantages), the setup does not work.
I've tried

but this will not get passed on to the servlet, instead, TomCat tries to retrieve the file (resulting in a 404)...
Maybe URL rewriting (using mod_rewrite) would work, but that's a complete mystery to me.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!