Hi,
I am not familiar with the Jasper Report...
Is there an API to generate reports ? If so you might be able to use
that directly in a resource method.
If you can do that what you might find is that you start reproducing
code in the resource method that might be more appropriate else where,
hence the separation of model and view.
You might be able to easily integrate such functionality as a
TemplateProcessor e.g. See Bill's integration of StringTemplate
http://github.com/dehora/jersey-stringtemplate
Thus you could potentially do:
@Produces("application/pdf")
public Viewable getReport() {
Model model = ...
return new Viewable(
"myreport.jr", // reference to a Jasper Report template
model);
}
Paul.
On Jul 14, 2009, at 10:05 AM, aloleary wrote:
>
> Hello,
> Has/Is anyone @Produce-ing JasperReports from Jersey/JAX-RS ?
> What is
> the best practice or suggested approach. All the Jasper examples I see
> typically involve a web view layer - something I'm trying to avoid
>
> Any pointers appreciated
>
> -A-
> --
> View this message in context: http://n2.nabble.com/Jaser-Reports---PDF-tp3254543p3254543.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>