users@jersey.java.net

Re: [Jersey] Does Jersey MVC support JSF 2.0

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Mon, 9 Aug 2010 08:09:36 +0200

On Aug 6, 2010, at 3:58 PM, Gu, James wrote:

> 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?

Can you explain more about data-binding?

We do plan to improve the Jersey MVC support in this area to cover
such areas as validation (i think the bean validation API will be
utilized).


> 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?
>

No, sorry :-( perhaps you can ask on a JSF related email list? I think
the problem is usually JSF is in full control and thus you may be
depending on some private functionality.

Paul.


> 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
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>