diff --git a/samples/pom.xml b/samples/pom.xml index b7901f49b6..37c68bf797 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -16,7 +16,6 @@ preauth openid ldap - portlet cas aspectj diff --git a/samples/portlet/pom.xml b/samples/portlet/pom.xml deleted file mode 100644 index 5783026cff..0000000000 --- a/samples/portlet/pom.xml +++ /dev/null @@ -1,98 +0,0 @@ - - 4.0.0 - - org.springframework.security - spring-security-samples - 3.0.0.CI-SNAPSHOT - - org.springframework.security - spring-security-samples-portlet - Spring Security - Portlet Sample - war - - - org.springframework.security - spring-security-core - ${project.version} - - - org.springframework.security - spring-security-portlet - ${project.version} - - - javax.portlet - portlet-api - 2.0 - provided - - - javax.servlet - servlet-api - - - org.springframework - spring-webmvc-portlet - ${spring.version} - - - org.springframework - spring-test - - - - javax.servlet - jstl - - - taglibs - standard - - - org.apache.commons - commons-io - 1.3.2 - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - - - - - - diff --git a/samples/portlet/src/main/java/org/springframework/web/portlet/sample/SecurityContextPortlet.java b/samples/portlet/src/main/java/org/springframework/web/portlet/sample/SecurityContextPortlet.java deleted file mode 100644 index 91b1af1513..0000000000 --- a/samples/portlet/src/main/java/org/springframework/web/portlet/sample/SecurityContextPortlet.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.springframework.web.portlet.sample; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Date; - -import javax.portlet.GenericPortlet; -import javax.portlet.PortletException; -import javax.portlet.PortletSession; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter; - - -/** - * A simple portlet which prints out the contents of the current {@link org.springframework.security.core.context.SecurityContext} - * - * @author Luke Taylor - */ -public class SecurityContextPortlet extends GenericPortlet { - - public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException { - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - out.println("

Security Context Display Portlet

"); - out.println("

"); - out.println(new Date()); - out.println("

Current Session " + request.getPortletSession().getId() + "

"); - out.println("

"); - out.println("

The security context contains: " + - SecurityContextHolder.getContext().getAuthentication() + - "

"); - Object lastException = request.getPortletSession().getAttribute(AbstractAuthenticationProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY, PortletSession.APPLICATION_SCOPE); - - if (lastException != null) { - out.println("Last Exception: " + lastException); - } - } -} diff --git a/samples/portlet/src/main/resources/applicationContext.xml b/samples/portlet/src/main/resources/applicationContext.xml deleted file mode 100644 index f9dd69c3ed..0000000000 --- a/samples/portlet/src/main/resources/applicationContext.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - messages - - - - - - - - - - - - - - - - - - notAuthorized - notAvailable - - - - - diff --git a/samples/portlet/src/main/resources/log4j.properties b/samples/portlet/src/main/resources/log4j.properties deleted file mode 100644 index 9abc2b829b..0000000000 --- a/samples/portlet/src/main/resources/log4j.properties +++ /dev/null @@ -1,19 +0,0 @@ -#log4j.debug=TRUE - -#log4j.rootLogger=FATAL, stdout -#log4j.rootLogger=ERROR, stdout -log4j.rootLogger=WARN, stdout -#log4j.rootLogger=INFO, stdout -#log4j.rootLogger=DEBUG, stdout - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n - -# spring portlet mvc classes -log4j.logger.org.springframework.web.portlet=INFO - -# spring portlet mvc sample classes -log4j.logger.org.springframework.web.portlet.sample=DEBUG - -log4j.logger.org.springframework.security=DEBUG \ No newline at end of file diff --git a/samples/portlet/src/main/resources/messages.properties b/samples/portlet/src/main/resources/messages.properties deleted file mode 100644 index b1742329c5..0000000000 --- a/samples/portlet/src/main/resources/messages.properties +++ /dev/null @@ -1,23 +0,0 @@ - -required=Required -required.java.util.Date=A date of the form 'MM/dd/yyyy' is required - -typeMismatch=Invalid Data Entry -typeMismatch.java.lang.Integer=Must be a number -typeMismatch.java.util.Date=Must be of the form 'MM/dd/yyyy' - -button.home=Home -button.edit=Edit - -exception.generalError.title=General Error - -exception.notAuthorized.title=Access Not Permitted -exception.notAuthorized.message=You do not have permission to access this area. - -exception.notAvailable.title=Resource Not Available -exception.notAvailable.message=That resource is not available. - -exception.contactAdmin=Please contact your System Administrator for assistance. - -portlet.exceptions.title=Sample Exceptions -portlet.exceptions.message=This portlet lets you see what uncaught exceptions will look like in your portlet. Select one of the exceptions below in order to throw it. diff --git a/samples/portlet/src/main/resources/messages_de.properties b/samples/portlet/src/main/resources/messages_de.properties deleted file mode 100644 index 3194b66f1f..0000000000 --- a/samples/portlet/src/main/resources/messages_de.properties +++ /dev/null @@ -1,15 +0,0 @@ - -# Apologies to those fluent in German -- these translations are straight from BabelFish and are only for demonstration purposes. - -exception.generalError.title=Allgemeine Störung - -exception.notAuthorized.title=Zugang Nicht Die Erlaubnis Gehabt -exception.notAuthorized.message=Sie haben nicht Erlaubnis, diesen Bereich zugänglich zu machen. - -exception.notAvailable.title=Hilfsmittel Nicht Vorhanden -exception.notAvailable.message=Dieses Hilfsmittel ist nicht vorhanden. - -exception.contactAdmin=Treten Sie bitte mit Ihrem Systemverwalter für Unterstützung in Verbindung. - -portlet.exceptions.title=Beispielausnahmen -portlet.exceptions.message=Dieses portlet läßt Sie sehen, welche uncaught Ausnahmen wie in Ihrem portlet aussehen. Wählen Sie eine der Ausnahmen unten vor, um sie zu werfen. diff --git a/samples/portlet/src/main/resources/portlet/securityContextPortlet.xml b/samples/portlet/src/main/resources/portlet/securityContextPortlet.xml deleted file mode 100644 index 8d72285a57..0000000000 --- a/samples/portlet/src/main/resources/portlet/securityContextPortlet.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tomcat - admin - manager - - Administrator - Guest - User - Power User - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/portlet/src/main/webapp/WEB-INF/jsp/defError.jsp b/samples/portlet/src/main/webapp/WEB-INF/jsp/defError.jsp deleted file mode 100644 index d38febcc7a..0000000000 --- a/samples/portlet/src/main/webapp/WEB-INF/jsp/defError.jsp +++ /dev/null @@ -1,10 +0,0 @@ -<%@ include file="/WEB-INF/jsp/include.jsp" %> - -

- -

${exception.localizedMessage == null ? exception : exception.localizedMessage }
-

- -

${exception.class}

- -

">- -

diff --git a/samples/portlet/src/main/webapp/WEB-INF/jsp/include.jsp b/samples/portlet/src/main/webapp/WEB-INF/jsp/include.jsp deleted file mode 100644 index 1db18553e4..0000000000 --- a/samples/portlet/src/main/webapp/WEB-INF/jsp/include.jsp +++ /dev/null @@ -1,10 +0,0 @@ -<%@ page contentType="text/html" isELIgnored="false" %> - -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> - -<%@ taglib prefix="portlet" uri="http://java.sun.com/portlet" %> -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> - -<%@ taglib prefix="html" tagdir="/WEB-INF/tags/html" %> diff --git a/samples/portlet/src/main/webapp/WEB-INF/jsp/notAuthorized.jsp b/samples/portlet/src/main/webapp/WEB-INF/jsp/notAuthorized.jsp deleted file mode 100644 index ffec8a9c94..0000000000 --- a/samples/portlet/src/main/webapp/WEB-INF/jsp/notAuthorized.jsp +++ /dev/null @@ -1,9 +0,0 @@ -<%@ include file="/WEB-INF/jsp/include.jsp" %> - -

- -


- -

- -

">- -

diff --git a/samples/portlet/src/main/webapp/WEB-INF/jsp/notAvailable.jsp b/samples/portlet/src/main/webapp/WEB-INF/jsp/notAvailable.jsp deleted file mode 100644 index c075a946a9..0000000000 --- a/samples/portlet/src/main/webapp/WEB-INF/jsp/notAvailable.jsp +++ /dev/null @@ -1,9 +0,0 @@ -<%@ include file="/WEB-INF/jsp/include.jsp" %> - -

- -


- -

- -

">- -

diff --git a/samples/portlet/src/main/webapp/WEB-INF/portlet.xml b/samples/portlet/src/main/webapp/WEB-INF/portlet.xml deleted file mode 100644 index 5235b18205..0000000000 --- a/samples/portlet/src/main/webapp/WEB-INF/portlet.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - Security Context Portlet - - org.springframework.web.portlet.DispatcherPortlet - - - contextConfigLocation - /WEB-INF/classes/portlet/securityContextPortlet.xml - - - text/html - view - - - Spring Security Context Display Portlet - - - - - user.login.id - - - user.name - - - user.name.full - - - diff --git a/samples/portlet/src/main/webapp/WEB-INF/web.xml b/samples/portlet/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index b98ffec13b..0000000000 --- a/samples/portlet/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - Spring Portlet MVC Sample Application - - - log4jConfigLocation - /WEB-INF/classes/log4j.properties - - - - contextConfigLocation - classpath:applicationContext.xml - - - - - org.springframework.web.util.Log4jConfigListener - - - - - - org.springframework.web.context.ContextLoaderListener - - - - - ViewRendererServlet - - org.springframework.web.servlet.ViewRendererServlet - - 1 - - - - ViewRendererServlet - /WEB-INF/servlet/view - - -