mraible wrote: > > Thanks for your help. I was able to get it working with Sun's RI + > Facelets. I'm confident I could get it working with MyFaces 1.2 as well - > but since they require a JSP 2.1 container (Sun's RI doesn't), I'll stick > with the RI. > > Here's the two ways I discovered: > > 1. Create a faces-config.xml file with the following contents: > > <?xml version="1.0" encoding="UTF-8"?> > <faces-config xmlns="http://java.sun.com/xml/ns/javaee" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee > http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd" > version="1.2"> > > <application> > <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> > </application> > </faces-config> > > 2. Integrate Ajax4JSF (no faces-config.xml required) and add the following > to your web.xml: > > <context-param> > <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name> > <param-value>com.sun.facelets.FaceletViewHandler</param-value> > </context-param> > > There does seem to be a bug with this integration however. The > content-type returned from a Facelets page by default is: > > Content-Type: application/xhtml+xml; charset=UTF-8 > > Since I'm using SiteMesh, my Facelets pages don't get decorated by > default. The workaround seems to be adding the following at the top of my > pages: > > <f:view contentType="text/html"> > > This doesn't happen when using JSP for the view. It also doesn't happen > when I use JSF standalone. > > Matt > Adding the following to sitemesh.xml allows me to remove the <f:view> tags from my Facelets pages: <parser content-type="application/xhtml+xml" class="com.opensymphony.module.sitemesh.parser.HTMLPageParser"/> Matt -- View this message in context: http://www.nabble.com/Can-I-integrate-Struts-2-%2B-JSF-and-Facelets--tf4138220.html#a11815698 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]