2
0
Эх сурвалжийг харах

Minor JSP classname fixes etc in samples

Luke Taylor 16 жил өмнө
parent
commit
408e982b96

+ 0 - 2
samples/contacts/src/main/webapp/WEB-INF/jsp/adminPermission.jsp

@@ -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>

+ 11 - 5
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" %>
 
-<h1>Sorry, access is denied</h1>
+<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>

+ 3 - 3
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" %>
 
 <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
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" %>
 
 <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">

+ 1 - 9
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">
 
-    <display-name>Spring Security Preauthentication Demo Application</display-name>
+    <display-name>Spring Security OpenID Demo Application</display-name>
 
     <!--
       - Location of the XML file that defines the root application context
@@ -55,12 +55,4 @@
         <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
     </listener>
 
-    <!--
-      - Publishes events for session creation and destruction through the application
-      - context. Optional unless concurrent session control is being used.
-      -->
-    <listener>
-      <listener-class>org.springframework.security.ui.session.HttpSessionEventPublisher</listener-class>
-    </listener>
-
 </web-app>

+ 0 - 3
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" %>
 
 <html>
   <head>