0

I am using RESTEasy in my project but I'm not that familiar with it. I need to use RESTEasy to return to a JSP page.

For example, I send a request to the server, the server processes the request then returns to a JSP page. How can I do this?

Bogdan
  • 22,670
  • 3
  • 67
  • 60
and1990
  • 55
  • 1
  • 8
  • try with javax.ws.rs.core.Response this will help you to get a response for the requests. – gks Oct 25 '13 at 08:55

1 Answers1

2

There is a plugin for RESTEasy that seems do do what you are asking: HTMLEasy. Slowly, there are features from it integrated into RESTEasy, mainly the View component.

As an alternative I think you can also borrow some ideas form another JAX-RS implementation, like Jersey, who has a Viewable class that can forward to a JSP based on a custom MessageBodyWriter (see these classes for how it's implemented:ViewableMessageBodyWriter and JSPTemplateProcessor).

And if the above looks a little bit heavy then have a look at this post for a simple solution.

Community
  • 1
  • 1
Bogdan
  • 22,670
  • 3
  • 67
  • 60