Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I configure a WebSecurityExpressionHandler with Spring security?
    primarykey
    data
    text
    <p>I had a project that was working ok with Spring 3.0. I've now moved to Maven to control dependencies and moved to Spring 3.1.2 jars and Spring security 3.1.1 jars.</p> <p>When I attempt to access a JSP that includes use of the security taglib (eg ) I get the error below:</p> <pre><code>javax.servlet.ServletException: javax.servlet.jsp.JspException: java.io.IOException: No visible WebSecurityExpressionHandler instance could be found in the application context. There must be at least one in order to support expressions in JSP 'authorize' tags. </code></pre> <p>In my security-context I have:</p> <pre><code>&lt;http auto-config="true" use-expressions="true" create-session="ifRequired" </code></pre> <p>From my old project:</p> <pre><code>&lt;beans:bean id="expressionHandler" class="org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler" /&gt; </code></pre> <p>I couldn't find that class in the packages I have for my project, so thinking it may just be a move of classes I tried:</p> <pre><code>&lt;beans:bean id="expressionHandler" class="org.springframework.security.web.access.expression.WebSecurityExpressionHandler" /&gt; </code></pre> <p>This gives me the same error.</p> <p>Spring-security dependencies I have configured at the moment: spring-security-core-3.1.1 spring-security-taglibs-3.1.1 spring-security-acl-3.1.1 spring-security-config-3.1.1 spring-security-web-3.1.1</p> <p>Am I missing a jar that would contain whatever 'use-expressions=true' needs?</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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