Error using Spring authorize tag to check to see if user is logged in?

Trying to test to see if a user is logged in I am using the following code:

<%@ taglib prefix="sec" uri="" %>

<sec:authorize access="isAuthenticated()">
   YES, you are logged in!

But I am getting the following erorr?

javax.servlet.jsp.JspException: 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.


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

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=""/>

Need Your Help

Repeat command automatically in Linux

linux bash ubuntu

Is it possible in linux command line to have a command repeat every n seconds.

How to Check Authenticity of an AJAX Request

javascript ajax security language-agnostic encryption

I am designing a web site in which users solve puzzles as quickly as they can. JavaScript is used to time each puzzle, and the number of milliseconds is sent to the server via AJAX when the puzzle is