as tag value

C: set tag to set non-primitive value

How can spring security tag be used <sec:authentication property="principal.id" />

as tag value <c:set…>

?

These statements:

<c:set var="userId" value="<sec:authentication property='principal.id' />"/>
<c:set var="userId" value="<sec:authentication property=\"principal.id\" />"/>

      

will not work.

+2


a source to share


1 answer


There is no reason to use the "value" attribute in your case. Use the tag <c:set>

like this:



<c:set var="userId">
    <sec:authentication property="principal.id"/>
</c:set>

      

+3


a source







All Articles