1
0
mirror of synced 2026-08-05 17:57:15 +00:00

Minor JSP classname fixes etc in samples

This commit is contained in:
Luke Taylor
2009-06-18 13:28:44 +00:00
parent 67a90b36ee
commit 408e982b96
6 changed files with 27 additions and 34 deletions
@@ -9,7 +9,6 @@
<c:out value="${model.contact}"/>
</code>
</p>
<p>
<table cellpadding="3" border="0">
<c:forEach var="acl" items="${model.acl.entries}">
<tr>
@@ -24,7 +23,6 @@
</tr>
</c:forEach>
</table>
</p>
<p>
<a href="<c:url value="addPermission.htm"><c:param name="contactId" value="${model.contact.id}"/></c:url>">Add Permission</a> <a href="<c:url value="index.htm"/>">Manage</a>
</p>
@@ -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" %>
<html>
<head>
<title>Access Denied</title>
</head>
<body>
<h1>Sorry, access is denied</h1>
<p>
<%= request.getAttribute(AccessDeniedHandlerImpl.SPRING_SECURITY_ACCESS_DENIED_EXCEPTION_KEY)%>
<%= request.getAttribute("SPRING_SECURITY_403_EXCEPTION")%>
</p>
<p>
<% Authentication auth = SecurityContextHolder.getContext().getAuthentication();
if (auth != null) { %>
Authentication object as a String: <%= auth.toString() %><BR><BR>
<% } %>
</p>
</body>
</html>
@@ -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" %>
<html>
@@ -15,8 +15,8 @@
<c:if test="${not empty param.login_error}">
<font color="red">
Your 'Exit User' attempt was not successful, try again.<BR><BR>
Reason: <%= ((AuthenticationException) session.getAttribute(AbstractProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %>
Your 'Exit User' attempt was not successful, try again.<br/><br/>
Reason: <%= ((AuthenticationException) session.getAttribute(AbstractAuthenticationProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %>
</font>
</c:if>
+12 -12
View File
@@ -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" %>
<html>
@@ -10,24 +10,24 @@
<body>
<h1>Switch to User</h1>
<P>Valid users:
<P>
<P>username <b>rod</b>, password <b>koala</b>
<P>username <b>dianne</b>, password <b>emu</b>
<p>username <b>scott</b>, password <b>wombat</b>
<p>username <b>bill</b>, password <b>wombat</b>
<p>username <b>bob</b>, password <b>wombat</b>
<p>username <b>jane</b>, password <b>wombat</b>
<p>
<h3>Valid users:</h3>
<p>username <b>rod</b>, password <b>koala</b></p>
<p>username <b>dianne</b>, password <b>emu</b></p>
<p>username <b>scott</b>, password <b>wombat</b></p>
<p>username <b>bill</b>, password <b>wombat</b></p>
<p>username <b>bob</b>, password <b>wombat</b></p>
<p>username <b>jane</b>, password <b>wombat</b></p>
<%-- this form-login-page form is also used as the
form-error-page to ask for a login again.
--%>
<c:if test="${not empty param.login_error}">
<p>
<font color="red">
Your 'su' attempt was not successful, try again.<BR><BR>
Reason: <%= ((AuthenticationException) session.getAttribute(AbstractProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %>
Your 'su' attempt was not successful, try again.<br/><br/>
Reason: <%= ((AuthenticationException) session.getAttribute(AbstractAuthenticationProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %>
</font>
</p>
</c:if>
<form action="<c:url value='j_spring_security_switch_user'/>" method="POST">