Hello,
 
I'm new to Struts 2 and have some experience with Sitemesh, but I'm
having trouble getting the two to work together.
 
I have defined a decorator like this:
 
    <decorator name="main" page="default.jsp">
        <pattern>/*.action</pattern>
    </decorator>

So it should be decorating anything that goes to Struts 2.  The
default.jsp file has a line that looks like this:
 
<page:applyDecorator name="theDecorator" page="/include/footer.action
<http://www.biworldwide.com/info/index.html> " />
 
When I run the page it fails with this error:
 
javax.servlet.ServletException: java.io.FileNotFoundException:
/myapp/include/footer.action
 
I know the decorator default.jsp is being applied because when I remove
the <page:applyDecorator> tag from it there are no errors.
 
If I change the <page:applyDecorator>'s page attribute to be an external
website, it works too.
 
So, it looks like it's not getting the call to another internal action.
I've triple-check the path and it is correct.  In fact, I disabled
Sitemesh and went to the /myapp/include/footer.action and it displayed
correctly.
 
Here's what's in web.xml:
 
     <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>

I don't know what else to do.  Can anybody figure out what's going on??
 
Thank you!!
 
-Ryan
 
 

This e-mail message is being sent solely for use by the intended recipient(s) 
and may contain confidential information.  Any unauthorized review, use, 
disclosure or distribution is prohibited.  If you are not the intended 
recipient, please contact the sender by phone or reply by e-mail, delete the 
original message and destroy all copies. Thank you.

Reply via email to