users@jersey.java.net

Re: [Jersey] Does Jersey MVC support JSF 2.0

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Fri, 6 Aug 2010 11:02:27 +0200

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
>