Note that there are some explanatory texts on larger screens.

plurals
  1. POStruts2 (2.3.1.2) and Sitemesh 2.3 - exclusions not working
    primarykey
    data
    text
    <p>Can some one help me on how to exclude decoration of child window? Here is my code:</p> <p>web.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;web-app id="WebApp_ID" 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"&gt; &lt;display-name&gt;Hello World Struts 2 Maven&lt;/display-name&gt; &lt;welcome-file-list&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; &lt;listener&gt; &lt;listener-class&gt;org.apache.struts2.dispatcher.ng.listener.StrutsListener&lt;/listener-class&gt; &lt;/listener&gt; &lt;!--Filters --&gt; &lt;filter&gt; &lt;filter-name&gt;struts-cleanup&lt;/filter-name&gt; &lt;filter-class&gt;org.apache.struts2.dispatcher.ActionContextCleanUp&lt;/filter-class&gt; &lt;/filter&gt; &lt;filter&gt; &lt;filter-name&gt;struts-prepare&lt;/filter-name&gt; &lt;filter-class&gt;org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter&lt;/filter-class&gt; &lt;/filter&gt; &lt;filter&gt; &lt;filter-name&gt;struts-execute&lt;/filter-name&gt; &lt;filter-class&gt;org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter&lt;/filter-class&gt; &lt;/filter&gt; &lt;filter&gt; &lt;filter-name&gt;sitemesh&lt;/filter-name&gt; &lt;filter-class&gt;com.opensymphony.module.sitemesh.filter.PageFilter&lt;/filter-class&gt; &lt;/filter&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;struts-prepare&lt;/filter-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt; &lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt; &lt;/filter-mapping&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;sitemesh&lt;/filter-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt; &lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt; &lt;/filter-mapping&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;struts-execute&lt;/filter-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt; &lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt; &lt;/filter-mapping&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;struts-cleanup&lt;/filter-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt; &lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt; &lt;/filter-mapping&gt; &lt;/web-app&gt; </code></pre> <p>struts.xml:</p> <pre><code>&lt;struts&gt; &lt;constant name="struts.devMode" value="true" /&gt; &lt;package name="basicstruts2" extends="struts-default"&gt; &lt;!-- If no class attribute is specified the framework will assume success and render the result index.jsp --&gt; &lt;!-- If no name value for the result node is specified the success value is the default --&gt; &lt;action name="index"&gt; &lt;result&gt;/index.jsp&lt;/result&gt; &lt;/action&gt; &lt;action name="child3"&gt; &lt;result&gt;/WEB-INF/popUp/Test.jsp&lt;/result&gt; &lt;/action&gt; &lt;!-- If the URL is hello.action the call the execute method of class HelloWorldAction. If the result returned by the execute method is success render the HelloWorld.jsp --&gt; &lt;action name="hello" class="org.apache.struts.helloworld.action.HelloWorldAction" method="execute"&gt; &lt;result name="success"&gt;/HelloWorld.jsp&lt;/result&gt; &lt;/action&gt; &lt;/package&gt; &lt;/struts&gt; </code></pre> <p>decorators.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt; &lt;decorators defaultdir="/decorators"&gt; &lt;excludes&gt; &lt;pattern&gt;/WEB-INF/popUp/Test.jsp&lt;/pattern&gt; &lt;pattern&gt;/popUp/Test.jsp&lt;/pattern&gt; &lt;pattern&gt;child3.html&lt;/pattern&gt; &lt;pattern&gt;child3&lt;/pattern&gt; &lt;pattern&gt;/default/child3&lt;/pattern&gt; &lt;pattern&gt;/default/child3.html&lt;/pattern&gt; &lt;/excludes&gt; &lt;decorator name="main" page="layout.jsp"&gt; &lt;pattern&gt;/*&lt;/pattern&gt; &lt;/decorator&gt; &lt;decorator name="panel" page="panel.jsp" /&gt; &lt;/decorators&gt; </code></pre> <p>I have already spent 2 days on this task and not succeeded yet. Can anyone help or point to me to some links?</p> <p>Regards, Nazir</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload