Trying to test to see if a user is logged in I am using the following code:
<%@ taglib prefix=\"sec\" uri=\"http://www.springframework.org/security/tags\" %&
Setting use-expressions="true" in the http element will work but means all your security settings in both Java code and security contexts must use expression notations. This can be a problem if you are currently using the standard security notations.
To use both expressions and standard notations just declare a new bean in your security context like so -
<beans:bean class="org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler"/>
To use expressions to secure individual URLs, you would first need to set the use-expressions attribute in the element to true
<http use-expressions="true">
See Spring Security doc