aspose file tools*
The moose likes Web Services and the fly likes Controller redirect to another Controller? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Controller redirect to another Controller?" Watch "Controller redirect to another Controller?" New topic
Author

Controller redirect to another Controller?

Mimi Tam
Ranch Hand

Joined: Mar 05, 2010
Posts: 121
In my RESTFUL Web Service, when HttpRequestController() got a POST, a new HTTP Response will be created in XML format and sent back to the Requestor as a HTTP Response message.

I (Web Service) also need to display this already sent HTTP Response in a predefined View.

Everything is done in the Server, Client is just a browser.

Please see my Controller code below:


Questions:

1. What should I return from the HttpRequestController() in order to get the HttpResponse View show up in Client's browser?

2. I know I can only do one or the other; either returning a HTTP Response View or the HTTP Response message in XML format straight to the Requestor's URL (i.e. Browser). How can I do the latter? By returning an HTTP Response object(POJO) like below?

public @ResponseBody HttpResponse createResponse(@RequestBody HttpRequest httpRequest) {...}

Any info/help will be greatly appreciated.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Controller redirect to another Controller?
 
Similar Threads
Respond to 3rd party requests
RestTemplate - How can I?
Do I need a separate Web Client?
@Responsebody for HTTP msg and a View to show the HTTP response msg
Marshalling plumbing - off base