users@javaserverfaces.java.net

Re: web.xml

From: Roger Kitain <roger.kitain_at_oracle.com>
Date: Sat, 10 Apr 2010 21:47:53 -0400

The servlet mapping is probably faces/* which will cause the request to
go through the
JSF servlet. The request must go through the JSF servlet for the page
to be rendered by JSF.

-roger

On 4/10/10 9:35 PM, Thufir wrote:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/
> xml/ns/javaee/web-app_2_5.xsd">
> <context-param>
> <param-name>javax.faces.PROJECT_STAGE</param-name>
> <param-value>Development</param-value>
> </context-param>
> <servlet>
> <servlet-name>Faces Servlet</servlet-name>
> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
> <load-on-startup>1</load-on-startup>
> </servlet>
> <servlet-mapping>
> <servlet-name>Faces Servlet</servlet-name>
> <url-pattern>/faces/*</url-pattern>
> </servlet-mapping>
> <session-config>
> <session-timeout>
> 30
> </session-timeout>
> </session-config>
> <welcome-file-list>
> <welcome-file>faces/index.xhtml</welcome-file>
> </welcome-file-list>
> </web-app>
>
>
>
> why does a welcome-file of:
>
> <welcome-file-list>
> <welcome-file>faces/index.xhtml</welcome-file>
> </welcome-file-list>
>
> work fine but:
>
> <welcome-file-list>
> <welcome-file>index.xhtml</welcome-file>
> </welcome-file-list>
>
>
> not cause the jsf markup to get parsed into html? Is that due to url
> pattern of /faces/*?
>
> What I don't get is the path:
>
> login_at_dtc01l0471-05:~$
> login_at_dtc01l0471-05:~$ ll NetBeansProjects/HelloJSF/web/index.xhtml
> -rw-r--r-- 1 login login 819 2010-04-10 18:26 NetBeansProjects/HelloJSF/
> web/index.xhtml
> login_at_dtc01l0471-05:~$
>
>
> the index.xhtml files simply isn't in the a faces directory.
>
>
>
>
> -Thufir
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: users-help_at_javaserverfaces.dev.java.net
>
>


-- 
roger.kitain_at_oracle.com
https://twitter.com/rogerk09
http://www.java.net/blogs/rogerk