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



Attachment: test.jspx
Description: Binary data

<?xml version="1.0"
	encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
	version="2.4">
	<listener>
		<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
	</listener>
	<context-param>
		<param-name>com.sun.faces.validateXml</param-name>
		<param-value>true</param-value>
	</context-param>
	<context-param>
		<param-name>com.sun.faces.verifyObjects</param-name>
		<param-value>true</param-value>
	</context-param>
	<servlet>
		<servlet-name>facesServlet</servlet-name>
		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
		<load-on-startup>15</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>facesServlet</servlet-name>
		<url-pattern>/faces/*</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>facesServlet</servlet-name>
		<url-pattern>*.faces</url-pattern>
	</servlet-mapping>
</web-app>
<?xml version="1.0"
	encoding="UTF-8"?>
<!DOCTYPE
	faces-config
	PUBLIC
	"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
	"http://java.sun.com/dtd/web-facesconfig_1_1.dtd";>
<faces-config>
</faces-config>

Reply via email to