users@jersey.java.net

Re: Does Jersey MVC support JSF 2.0

From: John Lister <john.lister_at_kickstone.com>
Date: Wed, 04 Aug 2010 21:46:49 +0100

I've had a similar problem and there seems to be 2 ways around it,
although not ideal.. Firstly JSF looks in the context root for its files
as it strips off the /faces/ part, whereas jersey checks the full path
for the file before forwarding the request, you can get around this by
having a dummy file in a /faces/ directory which mirrors the real file
(it can be empty).
Alternatively if you replace the mapping for JSF to *.xhtml both will
look in the /faces/ directory for the files.

I know none of these are ideal and would welcome other ideas...

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