• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Controller redirect to another Controller?

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
You guys wanna see my fabulous new place? Or do you wanna look at this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic