Richfaces failure when jsp:include with jspx file
shadowcreeper Oct 2, 2009 4:42 PMWhen I jsp:include a jspx file, Richfaces stops working. Below is a test case.
If I replace the jsp:include with an a4j:include, it works. Can anybody explain why?
Thanks.
-Shadow
I am using:
Richfaces 3.3.1.GA
JBoss 5.1.0.GA (and the JSF library there in)
Broken JSF page:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" %> <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich" %> <% // Make page expire immediately response.setHeader( "Expires", "Sat, 6 May 1995 12:00:00 GMT" ); response.setHeader( "Cache-Control", "no-store, no-cache, must-revalidate" ); response.addHeader( "Cache-Control", "post-check=0, pre-check=0" ); response.setHeader( "Pragma", "no-cache" ); %> <f:view> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <a4j:loadScript src="resource://prototype.js" /> <f:verbatim><title>Richfaces with jsp:include of jspx file test</title></f:verbatim> </head> <body onload="load();" onunload="GUnload();"> <jsp:include page="test1.jspx"/> <h:commandButton value="Click Me" onclick="Richfaces.showModalPanel('testModalPanel')"/> </body> </html> </f:view>
JSPX file:
<jsp:root xmlns="http://www.w3.org/1999/xhtml" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:rich="http://richfaces.ajax4jsf.org/rich" version="2.0"> <f:subview id="test1Subview"> <rich:modalPanel id="testModalPanel" resizeable="false" moveable="false" width="425" height="350"> <f:facet name="header"> <h:outputText value="It worked!"/> </f:facet> <f:facet name="controls"> <h:graphicImage value="/images/close_btn.png" style="cursor:pointer;" onclick="Richfaces.hideModalPanel('testModalPanel');"/> </f:facet> <h:outputText style="font-weight:bold;" value="Congratulations!!!" escape="false"/> </rich:modalPanel> </f:subview> </jsp:root>