dev@glassfish.java.net

Re: welcome-file and servlet-mapping config being ignored?

From: Ken Paulsen <Ken.Paulsen_at_Sun.COM>
Date: Tue, 12 Jun 2007 01:26:05 -0700

Hi Max,

Assuming you have a servlet-mapping for the FacesServlet of "/faces/*" the welcome-file below should work (I just tried it and it worked) -- although only for the index.jsp in the docroot.  For subdirectories, it doesn't work (and I'm not sure it can work as the welcome-file would have to insert "/faces" after your context root, and the page name at the end of the requested uri).

As for #2, are you saying the welcome-file is not invoked when you specify "index.jsf" as the welcome file and then make "http://<host>/<uri>/"?  If so, this works for our app... however, we actually have files named "index.jsf" (using JSFTemplating) which I think is a requirement for this to work.  However, if you mean that you have index.jsp and asking for index.jsf directly (w/ the servlet mapping mentioned) doesn't work... this should work (and I have test that it does work).

If you are testing after making web.xml changes w/o redeploying, you should remove the files in the "domains/domain1/generated/" directory.  GlassFish will not re-look at your web.xml files unless you redeploy or it can't find the information from the generated directory.

Good luck!

Ken

Max Poon wrote:
Hi *

On SJS AppServer 9.0_01 (+ NetBeans 5.5) :

(1) It seems that the <welcome-file> configured in my app's WEB-INF/web.xml :

    <welcome-file-list>
        <welcome-file>/faces/index.jsp</welcome-file>
    </welcome-file-list>

is always ignored as
(2) Also, FacesServlet is not invoked for http://<host>/<uri>/index.jsf even if web.xml has the following:

    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>


Any input much appreciated.

Thanks!
Max



--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@glassfish.dev.java.net For additional commands, e-mail: dev-help@glassfish.dev.java.net

picture
(image/png attachment: 01-part)