Hi, I'm new to SiteMesh and have been trying to use SiteMesh, Struts 2 with SiteMesh Plugin and Java 5 for a project. I have been stucked with this problem for a couple days. Thanks in advance for your help. It will be greatly appreciated!
Problem: When I requested index.html or index.jsp, the result page was decorated, but it didn't show the contenct because the <decorator: head /> and <docorator:body /> tags were not parsed or replaced with content in the requested page. *************************************************** This is my web.xml <web-app id="WebApp_9" version="2.4" 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"> <display-name>Prototype Application</display-name> <filter> <filter-name>struts-cleanup</filter-name> <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filt er-class> </filter> <filter> <filter-name>sitemesh</filter-name> <filter-class>org.apache.struts2.sitemesh.FreeMarkerPageFilter</filter -class> </filter> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-c lass> </filter> <filter-mapping> <filter-name>struts-cleanup</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>sitemesh</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app> ***************************************** This is my sitemesh.xml <sitemesh> <property name="decorators-file" value="/WEB-INF/decorators.xml" /> <excludes file="${decorators-file}" /> <page-parsers> <parser content-type="text/html" class="com.opensymphony.module.sitemesh.parser.HTMLPageParser" /> <parser content-type="text/html;charset=ISO-8859-1" class="com.opensymphony.module.sitemesh.parser.HTMLPageParser" /> </page-parsers> <decorator-mappers> <mapper class="com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper"> </mapper> </decorator-mappers> </sitemesh> ********************************** baseTemplate.jsp (this is my decorator) <%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %> <html> <head> <title>Static Title from Decorator Page</title> <decorator:head /> </head> <body> Static Text from Decorator Page <decorator:body /> </body> </html> ***************************** This is my index.html and index.jsp. (I tried both files, but neither work) <HTML> <HEAD> Header from requested page </HEAD> <BODY> Directly under war dir. TESTING!!! Click </BODY> </HTML> Thanks for your help in advanace. Rosalia -- View this message in context: http://www.nabble.com/Need-help%3A-%3Cdecorator%3Abody--%3E-not-parsed-tf4070536.html#a11567903 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]