Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SiteMesh 2.4.2 + Spring MVC 3.0.4 - using multiple decorators

I'm developing an application that uses SiteMesh 2.4.2 together with Spring MVC.

I'd like to have two decorators, e.g. :

<decorators>
  <decorator name="special" page="/WEB-INF/jsp/specialtemplate.jsp">
    <pattern>/something/*</pattern>
  </decorator> 

  <decorator name="main" page="/WEB-INF/jsp/pagetemplate.jsp">
    <pattern>/*</pattern>
  </decorator>
</decorators>

The problem is that only the main decorator is applied (also for pages /something/...)

How should I properly configure the decorators, so that for pages from /something/... the dedicated one is used?

the urls I'd like to use the specific template looks like http://server/context/something/etc

like image 760
jfu Avatar asked Dec 28 '25 22:12

jfu


1 Answers

Include the * symbol before the line

<decorator name="special" page="/WEB-INF/jsp/specialtemplate.jsp">
    <pattern>*/something/*</pattern>
</decorator> 
like image 114
miguelr Avatar answered Dec 30 '25 23:12

miguelr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!