• 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

How to call servlet from JSF ?

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a JSF bean , and I want to call a servlet and send to that servlet paramter from the bean , how can I do that ?
any help ??!!
 
Greenhorn
Posts: 6
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can call servlet from FacesContext. In order to pass parameters to servlet you can use query params. Sample code for that will be as follows.


 
Heba Fahmy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem that I have a navigation , so when I did this approach I got the following exception
javax.servlet.ServletException: Cannot forward after response has been committed

so how can I provide a navigation role which is important to display the user message that the user's parameters were submitted .
and in the same time I can call the servlet ??

I tried to provide that by the servlet it self , but the response format of the servlet as xml and it must be that because the system logic requires that.

any help ??
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please don't ask the same question twice.
 
reply
    Bookmark Topic Watch Topic
  • New Topic