0

I am developing a web site/application that really is a UI for a lot of REST calls in the backend. So, the backend uses JAX-RS from RESTeasy (v3.0.6). For the UI front end, I was hoping to template using JSP. Specifically, a user logs in, and is then redirected to a page which would be dynamically generated using a JSP. I am not able to get an HTMLEasy based solution to work because of various integration errors (see this SO post). There is supposed to be a pure RESTeasy approach which also did not work for me owing to the error Unable to find contextual data of type: javax.servlet.http.HttpServletRequest.

As a result, I am re-evaluating my entire approach to all of this. Is Htmleasy production quality? If so, where can I find good documentation to how exactly I should integrate it into my maven environment? Second, is JSP the best way to do my HTML template? Are there HTML templating solutions out there that work on jetty 9, maven, and RESTeasy? If so what are they? Lastly, does RESTeasy support JSP templating out of the box for producing text/html pages? If so, where can I find a tutorial with complete examples (not code stubs)?

Community
  • 1
  • 1
Sonny
  • 2,103
  • 1
  • 26
  • 34
  • I am getting a little worried about the tendency to try and close questions that cannot be answered by some people. There are unbelievably long answers to some questions right here on SO, and many closed questions have answers are very beneficial to the community. The questions that have been raised in this post, I can see, after two days of researching this on SO, is very useful for several folks! Where else is a beginner supposed to ask questions on such a topic? I can't find any help on Google! – Sonny Apr 09 '14 at 19:23
  • "For the UI front end, I was hoping to template using JSP." Meaning what? Have a set of JSP pages with some placeholders for variables? Every JSP related technology can do that. – developerwjk Apr 09 '14 at 22:35
  • And on the link to "pure RESTeasy approach" why do you want to avoid `request.getRequestDispatcher("eventView.jsp").forward(request, response);` (the accepted answer) and use some View abstraction? The forward is more readable and anyone used to any framework will instantly recognize it. Sometimes abstractions are just pointless complications. – developerwjk Apr 09 '14 at 22:45
  • @developerwjk: I'd be delighted to use it if I can get it to work (see my question--it gives me an error: `Unable to find contextual data of type: javax.servlet.http.HttpServletRequest`. Do you knkow how I could fix that problem? Also, on that link, @marcus says it is not clear if the method shown, using the `.getRequestDispatcher()` is a supported method. Thanks for your interest! – Sonny Apr 09 '14 at 22:58
  • @developerwjk: re: your comment about UI frontend: I'd take any JSP to work at this point. Where can I find an idiots guide to getting JSP to work on Jetty 9 and RESTeasy? – Sonny Apr 09 '14 at 23:00
  • Honestly, your problem is probably RESTeasy. JSP and Servlets is ridiculously simple. Maybe you should start with the basics before moving on to a framework. Join the buzzword train (i.e. RESTful, REST API, etc.) after you know how to put together something basic. – developerwjk Apr 09 '14 at 23:08
  • @developerwjk: I have put together a fully functional REST web app. The problem is to try to make my JAX-RS from JBoss (RESTeasy) spew out jsp pages without an error. – Sonny Apr 09 '14 at 23:19
  • Post a question with some code of a RESTeasy equivalent to a Servlet, and a JSP you're trying to spew out, and maybe you'll get an answer. But this question probably should have been closed because without code its just vague. – developerwjk Apr 09 '14 at 23:22

0 Answers0