users@glassfish.java.net

Unexpected behaviour of Faces Servlet on GlassFish 3

From: <glassfish_at_javadesktop.org>
Date: Sat, 08 May 2010 10:52:40 PDT

Hi community, i have some problems porting an existing application i did from GF2 to GF3.

I'm using JVM 6_20 i596(on windows) ,glassfish v3 and using as IDE netbeans 6.8. Couse this problems i made some experiments on deploing a new application.

Faces Servlet give me some unexpected (for me) errors using URL patterns that i try to explain below:

1- if i use standard pattern *.jsf and my file has extension .jsf server give me this exception:

AVVERTENZA: ApplicationDispatcher[/WebApplication1] PWC1231: Servlet.service() for servlet Faces Servlet threw exception
javax.servlet.ServletException: PWC1232: Exceeded maximum depth for nested request dispatches: 20

if i try to set javax.faces.DEFAULT_SUFFIX to ".jsf" it give me the same error.

2- using default xhtml files all work good, Faces Servlet is able to process the request but if in the URL PATTERN i put "/faces/*" (or whatever path), server can't fine the file.
For example if i put in the folder the file webapp/faces/hello.xhtml, and i ask the file
http://bla/webapp/faces/hello.xhtml i have the error:

    /hello.xhtml Not Found in ExternalContext as a Resource

java.io.FileNotFoundException: /hello.xhtml Not Found in ExternalContext as a Resource

and if i use http://bla/webapp/faces/hello.jsf

it can't find the resource.

3- related to second point, under the "/faces/*" folder the server retrive only the files that are under the root path.
For example if i have /hola.xhtml if i ask:

       http://bla/webapp/faces/hola.xhtml (and that file doesn't exist under /faces/)

it get me the file in the root.

Moreover, i ca recursly ask http://bla/webapp/faces/faces/faces/hola.xhtml, it get me
in anycase /hola.xhtml.


I tried everything with just a new webapplication in netbeans and gf3, i really can't understand why it has this behviour.

Could anyone help me? I tried to find some answers around the forum, i searched on JSF 2 specification some answer, but really can't find the problem.

Thanks very much , Daniele
[Message sent by forum member 'tapdani']

http://forums.java.net/jive/thread.jspa?messageID=469017