Hi Barry!
It works fine. Look at this example:
@GET @Produces({"text/html","application/xhtml+xml","application/xaml+xml"}) public Viewable listAdminHtml() throws Exception{ return new Viewable("/adminView",new MyObject()); }
adminView refers to a file called adminView.jsp
The second argument is the object named "it" in the jsp.
Anyway you can add other objects with request.setAttribute("name", object).
Hope it helps!
Jordi
Date: Wed, 16 Sep 2009 09:34:09 -0500
From: bmraczk_at_verizon.net
To: users_at_jersey.dev.java.net
Subject: [Jersey] NewBee to Jersey Viewable Class
Hi;
I've used the Jersey 1.0 framework and have had success with plain text. I am using a weblogic 10.0 server with a 1.5.12 JVM. I am trying to implement a JSP interface using the Viewable class. I have created a model and I have set an explicit uri. I cannot seem to get the jsp to display the model data using "it". Are there configuration settings I need. I have looked at the Bookstore example but it does not seem to help me with Jersey 1.0. I am trying to forward to the JSP using the response but I have had no success so far. Can any one point to a really good implementation that connects to a JSP. I don't think Viewable is working right.
Thank you in advance
Barry
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
For additional commands, e-mail: users-help_at_jersey.dev.java.net
_________________________________________________________________
Descárgate Internet Explorer 8 ¡Y gana gratis viajes con Spanair!
http://www.vivelive.com/spanair