Antonio Goncalves wrote:
Hello Antonio,
There are two options:
1. Set the context init parameter 'javax.faces.DEFAULT_SUFFIX'
(without the quotes)
to '.jspx' (and again) . This will cause the extension
substitution to use .jspx instead
of the default of .jsp.
2. Rename all of your .jspx files back to .jsp and add the following
to your web.xml
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<is-xml>true</is-xml>
</jsp-property-group>
</jsp-config>
-rl
> 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
>