You are only allowed to have one suffix with the default JSF implementation.

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

or

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

You could create your own view handler that does this.  Facelets
delegates non-facelets file extensions back to the default viewhandler
so that it can support both .xhtml and .jspx (for example).

It'd seem like it'd be fairly simple to extend the default viewhandler
functionality to try two suffixes instead of one.

There's been interest (for this very reason) expressed by others in
the last week for the same functionality.   Search through the past
week's myafces-users list for DEFAULT_SUFFIX to find the threads.


On 3/21/06, James Reynolds <[EMAIL PROTECTED]> wrote:
>
> I'm in the process of converting my jsp files to jspx.  I set up one
> test case and I was surprised by a 404 error.  Do I need to add some
> configuration in my web.xml?  In my faces-config I have:
>
> <navigation-rule>
>    <from-view-id>/welcome.jsp</from-view-id>
>    <navigation-case>
>        <from-outcome>go_template</from-outcome>
>        <to-view-id>/template.jspx</to-view-id>
>    </navigation-case>
> </navigation-rule>
>
>
> ***But the error I receive indicates that Tomcat is looking for a jsp
> extention:***
>
> HTTP Status 404 - /template.jsp
>
> ------------------------------------------------------------------------
> --------
>
> type Status report
>
> message /template.jsp
>
> description The requested resource (/template.jsp) is not available.
>
>
> ------------------------------------------------------------------------
> --------
>
> Apache Tomcat/5.5.15
>
>
>
>

Reply via email to