Well... according to Kito Mann's "JSF in Action" the FacesServlet will process
the request (xyz.faces) and then route to xyz.jsp, because this is the default
suffix.
Notice "default". This means you can override it!

Just add the "javax.faces.DEFAULT_SUFFIX" servletcontext parameter to override
this default suffix.

EG
        <context-param>
                <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                <param-value>jspx</param-value>
        </context-param>
will make the FacesServlet look for xyz.jspx

Which, if I understand your request, is what you want...

hth
Alexander

-----Original Message-----
From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 23, 2005 11:48 PM
To: MyFaces User List
Subject: Fw: Possible to map .faces files to .jspx files instead of only .jsps?

Does anyone know if there is a way to get this working? I just tested with 
MyFaces and the behavior appears to be the same as with the JSF RI. Using 
the /faces/* mapping works, but, I prefer having a simpler URL using 
*.faces.

Jon

----- Original Message ----- 
From: "Jonathan Eric Miller" <[EMAIL PROTECTED]>
To: "Jayashri Visvanathan" <[EMAIL PROTECTED]>
Sent: Wednesday, March 23, 2005 4:30 PM
Subject: Re: Possible to map .faces files to .jspx files instead of only 
.jsps?


> Sorry for the late reply, I've been busy on several projects and haven't 
> had
> time to do this until now. I attached a .war file to this message which 
> you
> can use for testing. I tested on Tomcat 5.5.7 with jsf-1_1_01. It is 
> assumed
> that you have JSF installed in the Tomcat shared/lib folder.
>
> The application works if you use the following URL.
>
> http://localhost:8080/test/faces/test.jspx
>
> What I want to do is use a URL like this. This works if you use .jsp 
> files,
> but, not if you use .jspx files.
>
> http://localhost:8080/test/test.faces
>
> This is the error that you receive. It would be nice if there was a way to
> configure Faces to look for .jspx instead of .jsp.
>
> HTTP Status 404 - /test.jsp
>
> --------------------------------------------------------------------------------
>
> type Status report
>
> message /test.jsp
>
> description The requested resource (/test.jsp) is not available.
>
>
> --------------------------------------------------------------------------------
>
> Apache Tomcat/5.5.7
>
> Jon
>
> ----- Original Message ----- 
> From: "Jayashri Visvanathan" <[EMAIL PROTECTED]>
> To: "Jonathan Eric Miller" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, March 14, 2005 5:28 PM
> Subject: Re: Possible to map .faces files to .jspx files instead of only
> .jsps?
>
>
>> Hi Jonathan,
>>  Can you please send me one of your .jspx file as well as your web.xml so
>> that I can reproduce the problem ?
>> Thanks
>> -Jayashri
>>
>> Jonathan Eric Miller wrote:
>>
>>> I switched over to using .jspx (JSP XML documents) files from using .jsp
>>> files. I found that I was only able to get it to work if I setup the
>>> mappings like,
>>>
>>> /faces/page.jspx
>>>
>>> rather than,
>>>
>>> page.faces
>>>
>>> I can get it to work the later way as long as I use .jsp files and not
>>> .jspx files. It seems like it defaults to .jsp. I'm wondering if there 
>>> is
>>> a way to configure the RI so that it looks for .jspxs instead?
>>>
>>> Jon
>>>
>>
> 

Reply via email to