You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by JS Portal support team <su...@jsportal.com> on 2006/10/12 21:42:58 UTC
shale and i18n
Hi,
Im in the process of implementing shale and am considering my renewed
architecture. I have a filter in place which checks the incoming request
for Locale info. It takes a request like
http://www.jsportal.com/en_GB/index.jsp and uses the RequestDispatcher
to forward the request to http://www.jsportal.com/en/GB/index.jsp, if
not found, http://www.jsportal.com/en/index.jsp, if not found
http://www.jsportal.com/index.jsp while also setting the Locale in the
session. This approach creates a very flexible i18n. However, using the
RequestDispatcher in this way seems to interfere with shale as it too
seems to use it. Once our filter dispatches the request the shale filter
seems never to be reached. Does shale have support for this type of i18n
or is there a way to alter the request URL without using the dispatcher?
I want to stay away from the response forward because I want my site to
be cached by searchengines with the locale in the URL.
Does anyone have any ideas how to tackle this problem?
Thank you,
Joost Schouten
Director
JS Portal
Dasstraat 21
2623CB Delft
the Netherlands
P: +31 6 160 160 14
E: joost@jsportal.com
W: www.jsportal.com
Re: shale and i18n
Posted by Craig McClanahan <cr...@apache.org>.
On 10/12/06, JS Portal support team <su...@jsportal.com> wrote:
>
> Hi,
>
> I'm in the process of implementing shale and am considering my renewed
> architecture. I have a filter in place which checks the incoming request
> for Locale info. It takes a request like
> http://www.jsportal.com/en_GB/index.jsp and uses the RequestDispatcher
> to forward the request to http://www.jsportal.com/en/GB/index.jsp, if
> not found, http://www.jsportal.com/en/index.jsp, if not found
> http://www.jsportal.com/index.jsp while also setting the Locale in the
> session. This approach creates a very flexible i18n. However, using the
> RequestDispatcher in this way seems to interfere with shale as it too
> seems to use it. Once our filter dispatches the request the shale filter
> seems never to be reached. Does shale have support for this type of i18n
> or is there a way to alter the request URL without using the dispatcher?
> I want to stay away from the response forward because I want my site to
> be cached by searchengines with the locale in the URL.
>
> Does anyone have any ideas how to tackle this problem?
With servlet 2.4 and later, you can declare that you want a filter to be
processed, even on a RequestDispatcher.forward request. It sounds like
you'll need to configure the Shale filter this way:
<filter-mapping>
<filter-name>Shale Filter</filter-name>
... URL pattern or servlet name or whatever ...
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
Thank you,
> Joost Schouten
> Director
Craig
JS Portal
> Dasstraat 21
> 2623CB Delft
> the Netherlands
> P: +31 6 160 160 14
> E: joost@jsportal.com
> W: www.jsportal.com
>
>