users@jersey.java.net

Re: [Jersey] Passing complex model objects to viewables

From: Martin Matula <martin.matula_at_oracle.com>
Date: Mon, 27 Sep 2010 12:22:17 +0200

Hi Timothy,
Try this in the JSP:

<%
MyComplexType it = (MyComplexType) request.getAttribute("it");
%>

Regards,
Martin

On Sep 23, 2010, at 10:52 PM, Timothy Rodriguez wrote:

> Hi guys,
>
> Forgive me if this is a simple question. But in the spirit of mvc I'm
> trying to use jersey to do a db query using jpa and pass the result
> list to a jsp for rendering. I see that viewable makes this object
> available as the parameter it. But I can't for the life of my figure
> out how to pass anything other than a string to the jsp.
>
> I want to pass a complex object. Cast it to the appropriate type in
> the jsp and then use it to render the page.
>
> Any thoughts? Am I going about this the wrong way?
>
> Thanks,
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>