5 Replies Latest reply on Feb 17, 2014 11:25 PM by Stephen Coy

    Welcome file does not work for *.jsf

    Gulam Samdani Expert

      I am using wildfly 8 final/CR1  edition

       

      and doing a hello JSF2.2 app With CDI .

      when use .jsf extension app can not work. but when use .xhml extension , it works fine.

       

      same problem not exists in Wildfly Beta but wildfly 8 final /cr1 gives this error ...

       

      problem :

       

         http://localhost:8080/hello ------------------------------ NO works***

         @http://localhost:8080/hello/index.jsf -------------   it works fine

       

       

       

      index.xhtml

       

      <?xml version='1.0' encoding='UTF-8' ?>

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      <html xmlns="http://www.w3.org/1999/xhtml"

            xmlns:h="http://xmlns.jcp.org/jsf/html"

            xmlns:f="http://xmlns.jcp.org/jsf/core">

          <h:head>

         

          </h:head>

          <h:body>

       

              <h:form>

                 Name :  <h:inputText value="#{helloBean.name}"/><br></br>

                             <h:commandButton value="save" actionListener="#{helloBean.save()}"/>

              </h:form>

                </h:body>

      </html>

       

       

       

       

       

       

      web.xml file is :

       

      <?xml version="1.0" encoding="UTF-8"?>

      <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">

        <display-name>helloJSF</display-name>

        <welcome-file-list>

       

          <welcome-file>index.jsf</welcome-file>

       

        </welcome-file-list>

        <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>*.jsf</url-pattern>

        </servlet-mapping>

      </web-app>

       

       

       

      any one pls help me  ?