users@glassfish.java.net

JSF tags not interpreted in .jsf file

From: <forums_at_java.net>
Date: Wed, 30 Nov 2011 09:00:55 -0600 (CST)

I created a web application (in NetBeans) and specified a jsf page as its
welcome page; I noticed that the web.xml:

<?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0"
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_3_0.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>
- referred to "faces/index.xhtml", so I changed the reference to
"faces/index.jsf". When I ran the application, the tags in index.jsf had not
been interpreted - they arrived as "<h:form > ..."

So, I tried to change the name of index.jsf to index.xhtml (and the reference
in web.xml accordingly); and now it works. Why is that? Where does it specify
that the file must be called something.xhtml?


--
[Message sent by forum member 'janpla']
View Post: http://forums.java.net/node/869191