Forums Register Login

Controller redirect to another Controller?

+Pie Number of slices to send: Send
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.
To do a great right, do a little wrong - shakepeare. twisted little ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1938 times.
Similar Threads
Marshalling plumbing - off base
Respond to 3rd party requests
@Responsebody for HTTP msg and a View to show the HTTP response msg
Do I need a separate Web Client?
RestTemplate - How can I?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 04:23:37.