tags:

views:

16

answers:

1

Its best to just show what I'm trying to achieve. This isn't meant to be functional, just describe the problem.

Here's what my tomcat web app currently accepts...

  /.../mywebapp/doSomething.jsp?id=somenumber.

I want it to look like

  /.../mywebapp/somenumber

What is this concept called, and does anyone have a good resource on it ? I'd like to use pure java as much as possible, and avoid the use of apache-specific or 3rd party resources.

+2  A: 

This is URL rewriting and if you don't want to implement it using mod_rewrite (and Apache HTTPD), then you could use Tuckey's UrlRewriteFilter, a Java Web Filter based on mod_rewrite.

Pascal Thivent
Hmm... which do you recommend ? Or, which is more common in real-world applications ?
JHarnach
@JHarnach Apache + mod\_rewrite is IMO the most efficient architecture (and will save some CPU cycles at the app server level) but also a bit more complex. If you don't have a dedicated box for Apache, if you don't want to use Apache, then Tuckey's filter is the way to go.
Pascal Thivent