Meaningless Drivel is fun!
The moose likes JSF and the fly likes Changing Locale link behave one step behind Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Changing Locale link behave one step behind" Watch "Changing Locale link behave one step behind" New topic

Changing Locale link behave one step behind

reubin haz
Ranch Hand

Joined: May 12, 2005
Posts: 287
I'm using JSF 2 to create a web app with internationalization, with a switch link between English and French. When the page is in English, the page will have a French link; when the page is in French, it will have a English link. But when the page language gets switched, the link is not refreshed, till I refresh the page.

I looked at some posts saying, to implements PhaseListener, but it need import javax.el.ValueExpression; which is from servlet-api.jar. If I include this jar in my lib folder, I will get error 'java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory'

I googled this error, it says its caused by the conflict. Tomcat has already had this jar, I then checked server lib folder, it is there, but how could my Java class reference to there?? If I remove jsp-api.jar from my own lib directory, it's a compilation error, if I ignore it and still build war file and deploy it, its still failed to start the application as error now is 'INFO: validateJarFile(/usr/local/apache-tomcat-6.0.26/webapps/my_project/WEB-INF/lib/servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

Please help, thanks.

I agree. Here's the link:
subject: Changing Locale link behave one step behind
It's not a secret anymore!