struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Friedman" <hum...@ix.netcom.com>
Subject RE: [HELP][Struts 2] Problem integrating sitemesh
Date Sat, 02 Sep 2006 17:42:27 GMT
Can we safely assume your last xml chunk is for /WEB-INF/decorators.xml?

Where is your /WEB-INF/sitemesh.xml?

What does your /decorators/main.jsp look like?

Have you tried changing your mapping from "*" to "/*" as the documentation
suggests?

And yes, I've used SiteMesh a few times and had no problems with it.

Regards,
David

-----Original Message-----
From: Garner Shawn [mailto:shawndgarner@gmail.com]
Sent: Saturday, September 02, 2006 9:56 AM
To: user@struts.apache.org
Subject: [HELP][Struts 2] Problem integrating sitemesh


I am trying to use sitemesh with struts 2.
I tried to merge the sitemesh blank in with the struts blank wars.
I get the "Struts is up and running" page but I can't tell that
sitemesh is working at all.
Can somebody tell me what I'm doing wrong?
>From what I can tell the home.jsp should be getting decorated with the
main.jsp

Thanks,
Shawn


<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>

    <display-name>Acme Corp</display-name>

    <filter>
        <filter-name>action2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter
-class>
    </filter>

	<filter>
    	<filter-name>sitemesh</filter-name>
    	<filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filte
r-class>
	</filter>

    <filter-mapping>
        <filter-name>action2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

	<filter-mapping>
	    <filter-name>sitemesh</filter-name>
	    <url-pattern>/*</url-pattern>
	</filter-mapping>


    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListene
r</listener-class>
    </listener>


    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>default.jsp</welcome-file>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>

    <!--
        This typically isn't required, as the taglib is included in
struts-core.jar.
        If you really need a taglib configuration within web.xml, copy
struts/src/java/META-INF/taglib.tld
        to the WEB-INF directory as tags.tld.
     -->
    <!--taglib>
        <taglib-uri>tags</taglib-uri>
        <taglib-location>/WEB-INF/tags.tld</taglib-location>
    </taglib-->
</web-app>

<?xml version="1.0" encoding="ISO-8859-1"?>

<decorators defaultdir="/decorators">
    <decorator name="main" page="main.jsp">
        <pattern>*</pattern>
    </decorator>

    <decorator name="panel" page="panel.jsp"/>
    <decorator name="printable" page="printable.jsp"/>
</decorators>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message