Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

RE: servlet-mapping like mod_rewrite?

Ralph Einfeldt

2003-12-10

Replies:


What about using one centralized servlet that parses
req.getPathInfo(), sets the language as request attribute
and forwards to the real servlet(s) ?

> -----Original Message-----
> From: Marten Lehmann [mailto:lehmann@(protected)]
> Sent: Tuesday, December 09, 2003 11:26 PM
> To: tomcat-user@(protected)
> Subject: servlet-mapping like mod_rewrite?
>
>
> through /de/* (german) and /en/* (english). Of course, I
> don't want to
> use two servlet-repositories for that. My idea is, that no matter if
> e.g. /en/helloworld or /de/helloworld is requested, a unique
> helloworld-servlet creates the response and chooses the language by
> parsing req.getPathInfo() for /de/ resp. /en/. As it isn't only one
> centralized servlet, I can't use the /* url-pattern. And I
> don't want to
> use a servlet-definition and according /en/??? and /de/???
> url-pattern
> for every single servlet. How else can I do this?
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.