users@glassfish.java.net

JSF and JSPX files

From: Antonio Goncalves <antonio.mailing_at_gmail.com>
Date: Mon, 23 Oct 2006 12:47:14 +0200

Hi,

I have a JSF application that uses JSP files and it works fine. I'm trying
now to migrate my JSP files into JSPX. I cannot tell JSF (the FacesServlet I
suppose) that it should look for .jspx extension. As an example, my
index.jsp page just forwards to a faces page :

<jsp:forward page="/*main.faces*"/>

Because I've renamed *main.jsp* into *main.jspx* I've got the following
error :

|SEVERE|sun-appserver-pe9.1|org.apache.jasper.servlet.JspServlet|PWC6117:File
"D:\Java\GlassfishV2b21\domains\petstore\applications\j2ee-apps\petstore\petstore_war\
*main.jsp" not found*|#]

I've tried to twist the web.xml file a bit, first by adding the jspx
extension to the properties :
    <jsp-config>
        <jsp-property-group>
            <url-pattern>*.jspx</url-pattern>
            <is-xml>true</is-xml>
        </jsp-property-group>
    </jsp-config>

And even to tell the JspServlet that it should take jspx file into account :
<servlet>
    <servlet-name>jsp</servlet-name>
    <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>jsp</servlet-name>
    <url-pattern>*.jspx</url-pattern>
</servlet-mapping>
I suppose what I really want is to tell FacesServlet to take jspx into
account.

Does anybody knows how to do that ?

Thanks,

Antonio