From 408e982b9646509de85efb52931ecd56482a6067 Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Thu, 18 Jun 2009 13:28:44 +0000 Subject: [PATCH] Minor JSP classname fixes etc in samples --- .../webapp/WEB-INF/jsp/adminPermission.jsp | 2 -- .../contacts/src/main/webapp/accessDenied.jsp | 16 +++++++++---- samples/contacts/src/main/webapp/exitUser.jsp | 6 ++--- .../contacts/src/main/webapp/switchUser.jsp | 24 +++++++++---------- .../openid/src/main/webapp/WEB-INF/web.xml | 10 +------- .../openid/src/main/webapp/openidlogin.jsp | 3 --- 6 files changed, 27 insertions(+), 34 deletions(-) diff --git a/samples/contacts/src/main/webapp/WEB-INF/jsp/adminPermission.jsp b/samples/contacts/src/main/webapp/WEB-INF/jsp/adminPermission.jsp index 809495b8a1..2e0d43fae4 100644 --- a/samples/contacts/src/main/webapp/WEB-INF/jsp/adminPermission.jsp +++ b/samples/contacts/src/main/webapp/WEB-INF/jsp/adminPermission.jsp @@ -9,7 +9,6 @@

-

@@ -24,7 +23,6 @@
-

">Add Permission ">Manage

diff --git a/samples/contacts/src/main/webapp/accessDenied.jsp b/samples/contacts/src/main/webapp/accessDenied.jsp index d40359f9a6..a8e886b3b8 100644 --- a/samples/contacts/src/main/webapp/accessDenied.jsp +++ b/samples/contacts/src/main/webapp/accessDenied.jsp @@ -1,16 +1,22 @@ <%@ page import="org.springframework.security.core.context.SecurityContextHolder" %> <%@ page import="org.springframework.security.core.Authentication" %> -<%@ page import="org.springframework.security.ui.AccessDeniedHandlerImpl" %> + + + Access Denied + + +

Sorry, access is denied

-

-<%= request.getAttribute(AccessDeniedHandlerImpl.SPRING_SECURITY_ACCESS_DENIED_EXCEPTION_KEY)%> - +<%= request.getAttribute("SPRING_SECURITY_403_EXCEPTION")%> +

- <% Authentication auth = SecurityContextHolder.getContext().getAuthentication(); if (auth != null) { %> Authentication object as a String: <%= auth.toString() %>

<% } %> +

+ + diff --git a/samples/contacts/src/main/webapp/exitUser.jsp b/samples/contacts/src/main/webapp/exitUser.jsp index 4423ffe461..8738d7bd74 100644 --- a/samples/contacts/src/main/webapp/exitUser.jsp +++ b/samples/contacts/src/main/webapp/exitUser.jsp @@ -2,7 +2,7 @@ <%@ page import="org.springframework.security.core.context.SecurityContextHolder" %> <%@ page import="org.springframework.security.core.Authentication" %> -<%@ page import="org.springframework.security.ui.AbstractProcessingFilter" %> +<%@ page import="org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter" %> <%@ page import="org.springframework.security.core.AuthenticationException" %> @@ -15,8 +15,8 @@ - Your 'Exit User' attempt was not successful, try again.

- Reason: <%= ((AuthenticationException) session.getAttribute(AbstractProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %> + Your 'Exit User' attempt was not successful, try again.

+ Reason: <%= ((AuthenticationException) session.getAttribute(AbstractAuthenticationProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %>
diff --git a/samples/contacts/src/main/webapp/switchUser.jsp b/samples/contacts/src/main/webapp/switchUser.jsp index 481b1c7666..029c2c44da 100644 --- a/samples/contacts/src/main/webapp/switchUser.jsp +++ b/samples/contacts/src/main/webapp/switchUser.jsp @@ -1,5 +1,5 @@ <%@ taglib prefix='c' uri='http://java.sun.com/jstl/core' %> -<%@ page import="org.springframework.security.ui.AbstractProcessingFilter" %> +<%@ page import="org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter" %> <%@ page import="org.springframework.security.core.AuthenticationException" %> @@ -10,24 +10,24 @@

Switch to User

-

Valid users: -

-

username rod, password koala -

username dianne, password emu -

username scott, password wombat -

username bill, password wombat -

username bob, password wombat -

username jane, password wombat -

+

Valid users:

+

username rod, password koala

+

username dianne, password emu

+

username scott, password wombat

+

username bill, password wombat

+

username bob, password wombat

+

username jane, password wombat

<%-- this form-login-page form is also used as the form-error-page to ask for a login again. --%> +

- Your 'su' attempt was not successful, try again.

- Reason: <%= ((AuthenticationException) session.getAttribute(AbstractProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %> + Your 'su' attempt was not successful, try again.

+ Reason: <%= ((AuthenticationException) session.getAttribute(AbstractAuthenticationProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %>
+

diff --git a/samples/openid/src/main/webapp/WEB-INF/web.xml b/samples/openid/src/main/webapp/WEB-INF/web.xml index 9cc9e28f00..ae15d0b118 100644 --- a/samples/openid/src/main/webapp/WEB-INF/web.xml +++ b/samples/openid/src/main/webapp/WEB-INF/web.xml @@ -9,7 +9,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> - Spring Security Preauthentication Demo Application + Spring Security OpenID Demo Application - - org.springframework.security.ui.session.HttpSessionEventPublisher - - diff --git a/samples/openid/src/main/webapp/openidlogin.jsp b/samples/openid/src/main/webapp/openidlogin.jsp index a332752841..0fef1d1104 100644 --- a/samples/openid/src/main/webapp/openidlogin.jsp +++ b/samples/openid/src/main/webapp/openidlogin.jsp @@ -1,7 +1,4 @@ <%@ taglib prefix='c' uri='http://java.sun.com/jstl/core_rt' %> -<%@ page import="org.springframework.security.ui.AbstractProcessingFilter" %> -<%@ page import="org.springframework.security.ui.webapp.AuthenticationProcessingFilter" %> -<%@ page import="org.springframework.security.core.AuthenticationException" %>