users@glassfish.java.net

Re: JSF and JSPX files

From: Antonio Goncalves <antonio.mailing_at_gmail.com>
Date: Tue, 24 Oct 2006 12:41:25 +0200

Thanks Ryan, I've added the following to the web.xml file and it works fine
:

    <context-param>
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
        <param-value>.jspx</param-value>
    </context-param>

Antonio


2006/10/23, Ryan Lubke <Ryan.Lubke_at_sun.com>:
>
> 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
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>