This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Changing Locale link behave one step behind  RSS feed

 
reubin haz
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!