Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Question about p:messages  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
If I remove this code it works ok generates error p:messages in jsf page



and here is my command button and p:messages:



So why the External context code blocks my warning p:messages ?
 
Bartender
Posts: 19728
92
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Burak!

Probably you are forwarding the request outside the FacesServlet, so that the raw xhtml is being copied back directly instead of being digested and used by FacesServlet to construct the View.

You'll probably be more successful if you use a ServletListener to do your routing to the login rather than attempt to do it in JSF code. Plus, it will be more secure that way.
 
Burak Hamşioğlu
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I said in my post when I remove the code it generates p:messages and there is no redirect to main page, but without removing the code then it doesn't generate p:messages but redirects to main page,
Can you give me sample of how to use ServletListener from a web site ?
thank you
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!