users@jersey.java.net

RE: [Jersey] Does Jersey MVC support JSF 2.0

From: Gu, James <james.gu_at_hp.com>
Date: Fri, 6 Aug 2010 13:58:24 +0000

Thanks Paul.

Mostly, I wanted to use the facelet as the presentation instead of JSP, and leverage the JSF's data binding and validation. Is there a plan in the future to support data binding and validation in Jersey? I think it'd valuable even in the pure web service use cases.

Yes, I went down the route to write a JSFTemplateProcessor, which is fairly straightforward following your example of the jsp processor. What I have not got the chance to try out is how the model objects are passed and used in facelet. Any suggestions?

Thanks.

James


-----Original Message-----
From: Paul Sandoz [mailto:Paul.Sandoz_at_oracle.com]
Sent: Friday, August 06, 2010 2:02 AM
To: users_at_jersey.dev.java.net
Subject: Re: [Jersey] Does Jersey MVC support JSF 2.0

Hi James,

Jersey does not currently have support for using JSF as templates so i
think you would have to write your own JSFTemplateProcessor as the
JSPTemplateProcessor is implemented to only support JSP files.

Also since JSF is a web framework i am not sure to what extent JAX-RS/
Jersey can be integrated with it as JSF as it's own way of managed/
dispatching the request and returning the response. Note that is not a
criticism of JSF, it's just the way it works, other web frameworks
behave similarly e.g. Wicket.

Paul.

On Aug 4, 2010, at 9:39 PM, Gu, James wrote:

> I've been using Jersey 1.3 for pure web service purposes but now am
> trying to take advantage the Jersey MVC with JSF 2.0. However, when
> I use the explicit view model, I got the following error:
>
> java.io.IOException: The template name, /faces/index.xhtml, could
> not be resolved to a fully qualified template name.
>
> The path was correct, i.e., I can invoke http://localhost:8080/faces/index.xhtml
> directly.
>
> Is there any support to use JSF 2.0 with Jersey? Or do I need to
> write my own JSFTemplateProcessor?
>
> Thanks.
>
> James Gu
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
For additional commands, e-mail: users-help_at_jersey.dev.java.net