• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Controller redirect to another Controller?

 
Mimi Tam
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic