Meaningless Drivel is fun!*
The moose likes Web Services and the fly likes @Responsebody for HTTP msg and a View to show the HTTP response msg Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "@Responsebody for HTTP msg and a View to show the HTTP response msg" Watch "@Responsebody for HTTP msg and a View to show the HTTP response msg" New topic
Author

@Responsebody for HTTP msg and a View to show the HTTP response msg

Mimi Tam
Ranch Hand

Joined: Mar 05, 2010
Posts: 121
How exactly can I trigger display of a model and view from another model and view’s controller?

HTTP Request View --> HttpRequestController POST -> new HttpResponse POJO and a string of the POJO in XML for the Http Response msg to be sent back to the Requestor --> <what should I return from the POST handler?>

I have HttpRequestController() to handle a POST message with data from an input Form and populated an HttpRequest POJO with it. An HttpResponse POJO is composed and persisted along with the HttpRequest to a Db.

The HttResponse is made into an XML string as the @Responsebody to be sent back (as an actual HTTP Response message with header and body) and I want to present this HttpResponse POJO in a View.

I tried different things, none worked and I could not find a similar example anywhere.

HttpRequestController, HttpRequest and HttpResponse POJOs:
I have an HttpResponse View (jspx) for ‘show’ and an unused HttpResponseController():

What should I return from the HttpRequestController().POST to trigger an HTTP Response message to be sent back and the data-sent-back to be shown on in an HTTP Response View?

I desperately need help. I’d be quite grateful for any pointers, any info or any suggestions. Please kindly help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: @Responsebody for HTTP msg and a View to show the HTTP response msg
 
Similar Threads
Controller redirect to another Controller?
Respond to 3rd party requests
RestTemplate - How can I?
Marshalling plumbing - off base
Do I need a separate Web Client?