Can you provide your struts.xml? 

Brian Relph

-----Original Message-----
From: Asleson, Ryan [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 16, 2008 1:52 PM
To: Struts Users Mailing List
Subject: Struts 2 and Sitemesh

 
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.

----------------------------------------------------------------------
CONFIDENTIALITY NOTICE This message and any included attachments are from 
Cerner Corporation and are intended only for the addressee. The information 
contained in this message is confidential and may constitute inside or 
non-public information under international, federal, or state securities laws. 
Unauthorized forwarding, printing, copying, distribution, or use of such 
information is strictly prohibited and may be unlawful. If you are not the 
addressee, please promptly delete this message and notify the sender of the 
delivery error by e-mail or you may call Cerner's corporate offices in Kansas 
City, Missouri, U.S.A at (+1) (816)221-1024.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to