Reputation: 9636
I'm displaying certain properties from property file in a JSP like so:
<spring:eval expression="@propertyConfigurer.getProperty('myproperty')"/>
Now, I'd like to use the same property inside <sec:authorize access="hasRole()/>
<sec:authorize access="hasRole('<spring:eval expression="@propertyConfigurer.getProperty('myproperty')"/>')">
which doesn't work.
Upvotes: 2
Views: 1911
Reputation: 7817
Try this:
<spring:eval expression="@propertyConfigurer.getProperty('myproperty')" var="myproperty"/>
<sec:authorize access="hasRole('${myproperty}')">
Upvotes: 1