This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I understand it is not possible to set the jsf UIViewroot locale from the servlet filter.
My problem is therefore as follows:
I know which locale the user needs from my servlet filter. How can I communicate to UIviewroot the locale I want from a servlet filter?
Any comment welcome.
Thanks in advance,
Joined: Apr 24, 2004
After some research I came to the conclusion that it is better to use a jsf phase listener instead of a servlet filter to meet my purpose.
The problem with trying this kind of stuff from a Servlet Filter is that the FacesContext is constructed per-request by the FacesServlet. Since Servlet Filters on the inbound side are intended for doing things before the servlet (or JSP) is invoked, FacesServlet hasn't yet begun to construct the FacesContext.
An IDE is no substitute for an Intelligent Developer.