May 2015
Intermediate to advanced
234 pages
4h 18m
English
In this recipe, you'll learn how to display some elements of a page only to authenticated users. For example, a summary box with the information about the account of the currently logged-in user.
Use the <sec:authorize> tag in the JSP file to add conditions for some content to be displayed:
pom.xml:<dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-taglibs</artifactId> <version>3.2.5.RELEASE</version> </dependency>
<sec:authorize>:<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> <sec:authorize access="isAuthenticated()" ...
Read now
Unlock full access