This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Sending a request and a response From a Managed Bean
 
It's not a secret anymore!