Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

navigation  RSS feed

 
Dura Hurtado
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am newbie in JSF and I need send data from an index.xhtml to a servlet data using a form. Like with .jsp then I used <form action ...>, but now it´s different.

I have tried with

FacesContext ctx = FacesContext.getCurrentInstance(); ctx.responseComplete(); ctx.getExternalContext().dispatch("/miPath");

but is doesn´t works, ¿where I must in the code above? , or what way it works.


Thanks.
 
Guy deLyonesse
Ranch Hand
Posts: 200
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you trying to accomplish by sending it to the separate servlet? I ask because if it's just business logic, you could just have your backing bean send the data into an object where your business logic can process it.

If you MUST use that servlet, then you could just create a new HTTP request string in your code and submit it back to the server.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!