You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Alf Felis <Al...@gmx.de> on 2010/01/20 14:08:54 UTC
[Tobago] Locale changed when handling exceptions
Hi all,
I have a problem with the locale and the error handling.
My application provides the possibility to choose the preferred language.
I set the selected locale with the following code
FacesContext.getCurrentInstance().getViewRoot().setLocale(selectedLocale);
Everything works fine until the error page is called.
For any exception I use one error page set within the web.xml.
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/faces/ErrorPage.jsp</location>
</error-page>
If now an error occurred the locale set by my code above will be overridden and set to the browser locale.
How can I avoid this?
Best regards,
Alf
--
Preisknaller: GMX DSL Flatrate für nur 16,99 Euro/mtl.!
http://portal.gmx.net/de/go/dsl02