wood burning stoves*
The moose likes JSF and the fly likes Sending a request and a response From a Managed Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Sending a request and a response From a Managed Bean" Watch "Sending a request and a response From a Managed Bean" New topic
Author

Sending a request and a response From a Managed Bean

Ayaan Dar
Greenhorn

Joined: Oct 27, 2010
Posts: 10
Hi,

I have a Managed Bean that needs to send a request to a Servlet deployed on a Separate Server and read the response from it . How can i do this?

Kind Regards.

Maroun Baydoun
Greenhorn

Joined: Sep 23, 2011
Posts: 4

I am not sure you can invoke a remote server the way you're intending. A workaround would be to use a URLConnection that will send a request to the servlet and will enable you to get some form of feedback

For example:

Ayaan Dar
Greenhorn

Joined: Oct 27, 2010
Posts: 10
This is exactly the way i did it. Here is the complete code for anyone who wants its
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sending a request and a response From a Managed Bean