• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic