Sitemesh: decorator.xml using .properties file

1.1k views Asked by At

Im trying to keep constant all the urls of my aplication storing it in a .properties file. For example:

//url.properties
url.prefix.module_users=/users

So, in case that I want to change an url, dont have to look for all the places where I use it. I use this in my spring-security.xml, controllers. I wonder if in my decorators.xml file I can use it as well:

<?xml version="1.0" encoding="UTF-8"?>
<decorators defaultdir="/decorators">
        <decorator name="layout-login" page="layout-login.jsp">
        <pattern>/</pattern>
    </decorator>
    <decorator name="layout-base" page="layout-base.jsp">
         <pattern>${url.prefix.module_users}/*</pattern>
    </decorator>
</decorators>

Is this possible?

0

There are 0 answers