• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Changing Locale link behave one step behind

 
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic