Added: turbine/fulcrum/trunk/jetty/src/test/jetty/etc/webdefault.xml URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/jetty/src/test/jetty/etc/webdefault.xml?rev=677925&view=auto ============================================================================== --- turbine/fulcrum/trunk/jetty/src/test/jetty/etc/webdefault.xml (added) +++ turbine/fulcrum/trunk/jetty/src/test/jetty/etc/webdefault.xml Fri Jul 18 08:01:51 2008 @@ -0,0 +1,402 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + +<!-- ===================================================================== --> +<!-- This file contains the default descriptor for web applications. --> +<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> +<!-- The intent of this descriptor is to include jetty specific or common --> +<!-- configuration for all webapps. If a context has a webdefault.xml --> +<!-- descriptor, it is applied before the contexts own web.xml file --> +<!-- --> +<!-- A context may be assigned a default descriptor by: --> +<!-- + Calling WebApplicationContext.setDefaultsDescriptor --> +<!-- + Passed an arg to addWebApplications --> +<!-- --> +<!-- This file is used both as the resource within the jetty.jar (which is --> +<!-- used as the default if no explicit defaults descriptor is set) and it --> +<!-- is copied to the etc directory of the Jetty distro and explicitly --> +<!-- by the jetty.xml file. --> +<!-- --> +<!-- ===================================================================== --> +<web-app + xmlns="http://java.sun.com/xml/ns/javaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" + metadata-complete="true" + version="2.5"> + + <description> + Default web.xml file. + This file is applied to a Web application before it's own WEB_INF/web.xml file + </description> + + + <!-- ==================================================================== --> + <!-- Context params to control Session Cookies --> + <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <!-- UNCOMMENT TO ACTIVATE + <context-param> + <param-name>org.mortbay.jetty.servlet.SessionDomain</param-name> + <param-value>127.0.0.1</param-value> + </context-param> + + <context-param> + <param-name>org.mortbay.jetty.servlet.SessionPath</param-name> + <param-value>/</param-value> + </context-param> + + <context-param> + <param-name>org.mortbay.jetty.servlet.MaxAge</param-name> + <param-value>-1</param-value> + </context-param> + --> + + <context-param> + <param-name>org.mortbay.jetty.webapp.NoTLDJarPattern</param-name> + <param-value>start.jar|ant-.*\.jar|dojo-.*\.jar|jetty-.*\.jar|jsp-api-.*\.jar|junit-.*\.jar|servlet-api-.*\.jar|dnsns\.jar|rt\.jar|jsse\.jar|tools\.jar|sunpkcs11\.jar|sunjce_provider\.jar|xerces.*\.jar</param-value> + </context-param> + + + + <!-- ==================================================================== --> + <!-- The default servlet. --> + <!-- This servlet, normally mapped to /, provides the handling for static --> + <!-- content, OPTIONS and TRACE methods for the context. --> + <!-- The following initParameters are supported: --> + <!-- --> + <!-- acceptRanges If true, range requests and responses are --> + <!-- supported --> + <!-- --> + <!-- dirAllowed If true, directory listings are returned if no --> + <!-- welcome file is found. Else 403 Forbidden. --> + <!-- --> + <!-- redirectWelcome If true, redirect welcome file requests --> + <!-- else use request dispatcher forwards --> + <!-- --> + <!-- gzip If set to true, then static content will be served--> + <!-- as gzip content encoded if a matching resource is --> + <!-- found ending with ".gz" --> + <!-- --> + <!-- resoureBase Can be set to replace the context resource base --> + <!-- --> + <!-- relativeResourceBase --> + <!-- Set with a pathname relative to the base of the --> + <!-- servlet context root. Useful for only serving --> + <!-- static content from only specific subdirectories. --> + <!-- --> + <!-- useFileMappedBuffer --> + <!-- If set to true (the default), a memory mapped --> + <!-- file buffer will be used to serve static content --> + <!-- when using an NIO connector. Setting this value --> + <!-- to false means that a direct buffer will be used --> + <!-- instead. If you are having trouble with Windows --> + <!-- file locking, set this to false. --> + <!-- --> + <!-- cacheControl If set, all static content will have this value --> + <!-- set as the cache-control header. --> + <!-- --> + <!-- maxCacheSize Maximum size of the static resource cache --> + <!-- --> + <!-- maxCachedFileSize Maximum size of any single file in the cache --> + <!-- --> + <!-- maxCachedFiles Maximum number of files in the cache --> + <!-- --> + <!-- cacheType "nio", "bio" or "both" to determine the type(s) --> + <!-- of resource cache. A bio cached buffer may be used--> + <!-- by nio but is not as efficient as a nio buffer. --> + <!-- An nio cached buffer may not be used by bio. --> + <!-- --> + <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <servlet> + <servlet-name>default</servlet-name> + <servlet-class>org.mortbay.jetty.servlet.DefaultServlet</servlet-class> + <init-param> + <param-name>acceptRanges</param-name> + <param-value>true</param-value> + </init-param> + <init-param> + <param-name>dirAllowed</param-name> + <param-value>true</param-value> + </init-param> + <init-param> + <param-name>redirectWelcome</param-name> + <param-value>false</param-value> + </init-param> + <init-param> + <param-name>maxCacheSize</param-name> + <param-value>256000000</param-value> + </init-param> + <init-param> + <param-name>maxCachedFileSize</param-name> + <param-value>10000000</param-value> + </init-param> + <init-param> + <param-name>maxCachedFiles</param-name> + <param-value>1000</param-value> + </init-param> + <init-param> + <param-name>cacheType</param-name> + <param-value>both</param-value> + </init-param> + <init-param> + <param-name>gzip</param-name> + <param-value>true</param-value> + </init-param> + <init-param> + <param-name>useFileMappedBuffer</param-name> + <param-value>true</param-value> + </init-param> + <!-- + <init-param> + <param-name>cacheControl</param-name> + <param-value>max-age=3600,public</param-value> + </init-param> + --> + <load-on-startup>0</load-on-startup> + </servlet> + + <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> + + + <!-- ==================================================================== --> + <!-- JSP Servlet --> + <!-- This is the jasper JSP servlet from the jakarta project --> + <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <!-- The JSP page compiler and execution servlet, which is the mechanism --> + <!-- used by Glassfish to support JSP pages. Traditionally, this servlet --> + <!-- is mapped to URL patterh "*.jsp". This servlet supports the --> + <!-- following initialization parameters (default values are in square --> + <!-- brackets): --> + <!-- --> + <!-- checkInterval If development is false and reloading is true, --> + <!-- background compiles are enabled. checkInterval --> + <!-- is the time in seconds between checks to see --> + <!-- if a JSP page needs to be recompiled. [300] --> + <!-- --> + <!-- compiler Which compiler Ant should use to compile JSP --> + <!-- pages. See the Ant documenation for more --> + <!-- information. [javac] --> + <!-- --> + <!-- classdebuginfo Should the class file be compiled with --> + <!-- debugging information? [true] --> + <!-- --> + <!-- classpath What class path should I use while compiling --> + <!-- generated servlets? [Created dynamically --> + <!-- based on the current web application] --> + <!-- Set to ? to make the container explicitly set --> + <!-- this parameter. --> + <!-- --> + <!-- development Is Jasper used in development mode (will check --> + <!-- for JSP modification on every access)? [true] --> + <!-- --> + <!-- enablePooling Determines whether tag handler pooling is --> + <!-- enabled [true] --> + <!-- --> + <!-- fork Tell Ant to fork compiles of JSP pages so that --> + <!-- a separate JVM is used for JSP page compiles --> + <!-- from the one Tomcat is running in. [true] --> + <!-- --> + <!-- ieClassId The class-id value to be sent to Internet --> + <!-- Explorer when using <jsp:plugin> tags. --> + <!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] --> + <!-- --> + <!-- javaEncoding Java file encoding to use for generating java --> + <!-- source files. [UTF-8] --> + <!-- --> + <!-- keepgenerated Should we keep the generated Java source code --> + <!-- for each page instead of deleting it? [true] --> + <!-- --> + <!-- logVerbosityLevel The level of detailed messages to be produced --> + <!-- by this servlet. Increasing levels cause the --> + <!-- generation of more messages. Valid values are --> + <!-- FATAL, ERROR, WARNING, INFORMATION, and DEBUG. --> + <!-- [WARNING] --> + <!-- --> + <!-- mappedfile Should we generate static content with one --> + <!-- print statement per input line, to ease --> + <!-- debugging? [false] --> + <!-- --> + <!-- --> + <!-- reloading Should Jasper check for modified JSPs? [true] --> + <!-- --> + <!-- suppressSmap Should the generation of SMAP info for JSR45 --> + <!-- debugging be suppressed? [false] --> + <!-- --> + <!-- dumpSmap Should the SMAP info for JSR45 debugging be --> + <!-- dumped to a file? [false] --> + <!-- False if suppressSmap is true --> + <!-- --> + <!-- scratchdir What scratch directory should we use when --> + <!-- compiling JSP pages? [default work directory --> + <!-- for the current web application] --> + <!-- --> + <!-- tagpoolMaxSize The maximum tag handler pool size [5] --> + <!-- --> + <!-- xpoweredBy Determines whether X-Powered-By response --> + <!-- header is added by generated servlet [false] --> + <!-- --> + <!-- If you wish to use Jikes to compile JSP pages: --> + <!-- Set the init parameter "compiler" to "jikes". Define --> + <!-- the property "-Dbuild.compiler.emacs=true" when starting Jetty --> + <!-- to cause Jikes to emit error messages in a format compatible with --> + <!-- Jasper. --> + <!-- If you get an error reporting that jikes can't use UTF-8 encoding, --> + <!-- try setting the init parameter "javaEncoding" to "ISO-8859-1". --> + <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <servlet id="jsp"> + <servlet-name>jsp</servlet-name> + <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> + <init-param> + <param-name>logVerbosityLevel</param-name> + <param-value>DEBUG</param-value> + </init-param> + <init-param> + <param-name>fork</param-name> + <param-value>false</param-value> + </init-param> + <init-param> + <param-name>xpoweredBy</param-name> + <param-value>false</param-value> + </init-param> + <!-- + <init-param> + <param-name>classpath</param-name> + <param-value>?</param-value> + </init-param> + --> + <load-on-startup>0</load-on-startup> + </servlet> + + <servlet-mapping> + <servlet-name>jsp</servlet-name> + <url-pattern>*.jsp</url-pattern> + <url-pattern>*.jspf</url-pattern> + <url-pattern>*.jspx</url-pattern> + <url-pattern>*.xsp</url-pattern> + <url-pattern>*.JSP</url-pattern> + <url-pattern>*.JSPF</url-pattern> + <url-pattern>*.JSPX</url-pattern> + <url-pattern>*.XSP</url-pattern> + </servlet-mapping> + + <!-- ==================================================================== --> + <!-- Dynamic Servlet Invoker. --> + <!-- This servlet invokes anonymous servlets that have not been defined --> + <!-- in the web.xml or by other means. The first element of the pathInfo --> + <!-- of a request passed to the envoker is treated as a servlet name for --> + <!-- an existing servlet, or as a class name of a new servlet. --> + <!-- This servlet is normally mapped to /servlet/* --> + <!-- This servlet support the following initParams: --> + <!-- --> + <!-- nonContextServlets If false, the invoker can only load --> + <!-- servlets from the contexts classloader. --> + <!-- This is false by default and setting this --> + <!-- to true may have security implications. --> + <!-- --> + <!-- verbose If true, log dynamic loads --> + <!-- --> + <!-- * All other parameters are copied to the --> + <!-- each dynamic servlet as init parameters --> + <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <!-- Uncomment for dynamic invocation + <servlet> + <servlet-name>invoker</servlet-name> + <servlet-class>org.mortbay.jetty.servlet.Invoker</servlet-class> + <init-param> + <param-name>verbose</param-name> + <param-value>false</param-value> + </init-param> + <init-param> + <param-name>nonContextServlets</param-name> + <param-value>false</param-value> + </init-param> + <init-param> + <param-name>dynamicParam</param-name> + <param-value>anyValue</param-value> + </init-param> + <load-on-startup>0</load-on-startup> + </servlet> + + <servlet-mapping> <servlet-name>invoker</servlet-name> <url-pattern>/servlet/*</url-pattern> </servlet-mapping> + --> + + + + <!-- ==================================================================== --> + <session-config> + <session-timeout>30</session-timeout> + </session-config> + + <!-- ==================================================================== --> + <!-- Default MIME mappings --> + <!-- The default MIME mappings are provided by the mime.properties --> + <!-- resource in the org.mortbay.jetty.jar file. Additional or modified --> + <!-- mappings may be specified here --> + <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <!-- UNCOMMENT TO ACTIVATE + <mime-mapping> + <extension>mysuffix</extension> + <mime-type>mymime/type</mime-type> + </mime-mapping> + --> + + <!-- ==================================================================== --> + <welcome-file-list> + <welcome-file>index.html</welcome-file> + <welcome-file>index.htm</welcome-file> + <welcome-file>index.jsp</welcome-file> + </welcome-file-list> + + <!-- ==================================================================== --> + <locale-encoding-mapping-list> + <locale-encoding-mapping><locale>ar</locale><encoding>ISO-8859-6</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>be</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>bg</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>ca</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>cs</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>da</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>de</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>el</locale><encoding>ISO-8859-7</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>en</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>es</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>et</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>fi</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>fr</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>hr</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>hu</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>is</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>it</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>iw</locale><encoding>ISO-8859-8</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>ja</locale><encoding>Shift_JIS</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>ko</locale><encoding>EUC-KR</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>lt</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>lv</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>mk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>nl</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>no</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>pl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>pt</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>ro</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>ru</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>sh</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>sk</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>sl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>sq</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>sr</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>sv</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>tr</locale><encoding>ISO-8859-9</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>uk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>zh</locale><encoding>GB2312</encoding></locale-encoding-mapping> + <locale-encoding-mapping><locale>zh_TW</locale><encoding>Big5</encoding></locale-encoding-mapping> + </locale-encoding-mapping-list> + + <security-constraint> + <web-resource-collection> + <web-resource-name>Disable TRACE</web-resource-name> + <url-pattern>/</url-pattern> + <http-method>TRACE</http-method> + </web-resource-collection> + <auth-constraint/> + </security-constraint> + +</web-app> +
Added: turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/WEB-INF/web.xml?rev=677925&view=auto ============================================================================== --- turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/WEB-INF/web.xml (added) +++ turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/WEB-INF/web.xml Fri Jul 18 08:01:51 2008 @@ -0,0 +1,37 @@ +<web-app + xmlns="http://java.sun.com/xml/ns/javaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" + version="2.5"> + + <display-name>JAAS Test</display-name> + + <welcome-file-list> + <welcome-file>index.html</welcome-file> + </welcome-file-list> + + + <security-constraint> + <web-resource-collection> + <web-resource-name>JAAS Role</web-resource-name> + <url-pattern>/auth.html</url-pattern> + </web-resource-collection> + <auth-constraint> + <role-name>roleA</role-name> + </auth-constraint> + </security-constraint> + + + <login-config> + <auth-method>FORM</auth-method> + <realm-name>Test JAAS Realm</realm-name> + <form-login-config> + <form-login-page> + /login.html + </form-login-page> + <form-error-page> + /authfail.html + </form-error-page> + </form-login-config> + </login-config> +</web-app> Added: turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/auth.html URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/auth.html?rev=677925&view=auto ============================================================================== --- turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/auth.html (added) +++ turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/auth.html Fri Jul 18 08:01:51 2008 @@ -0,0 +1,17 @@ +<HTML> + <HEAD> + <META http-equiv="Pragma" content="no-cache"> + <META http-equiv="Cache-Control" content="no-cache,no-store"> + <H1>Congratulations, you are AUTHENTICATED and web AUTHORIZED</H1> + </HEAD> + + <BODY> + Well done. In order to see this page, you must have been JAAS authentictated using the + configured Login Module. You have also been AUTHORIZED according to this webapp's role-based web security constraints. + <P> + To logout click: + <P> + <A HREF="logout.jsp">Logout</A> + <P> + </BODY> +</HTML> Added: turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/authfail.html URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/authfail.html?rev=677925&view=auto ============================================================================== --- turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/authfail.html (added) +++ turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/authfail.html Fri Jul 18 08:01:51 2008 @@ -0,0 +1,7 @@ +<html> + <head><title>Authentication Failure</title</head> + <body> + <h1>Authentication Failure</h1> + <p>Sorry, either your login or password were incorrect, please try again.</p> + <a href="auth.html">Login</a> +</html> Added: turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/index.html URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/index.html?rev=677925&view=auto ============================================================================== --- turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/index.html (added) +++ turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/index.html Fri Jul 18 08:01:51 2008 @@ -0,0 +1,25 @@ +<HTML><HEAD><TITLE>Welcome to the JAAS Authentication and Authorization Test</TITLE></HEAD> +<BODY> + <H1> Welcome to the JAAS Authentication and Authorization Demo </H1> + <h2>Setup Instructions</h2> + <p> + For this demo to work, you must be running jetty with the etc/jetty-jaas.xml included on the runline: + </p> + <pre> + java -jar start.jar etc/jetty.xml etc/jetty-jaas.xml + </pre> + <h2>Using the Demo</h2> + <P> + Click on the following link to test JAAS AUTHENTICATION and role-based web security + constraint AUTHORIZATION. + </P> + <p> + This demo uses a simple login module that stores it's configuration in a properties file. There are other types of login module provided with the jetty distro. For full information, please refer to the jetty JAAS wiki page at: <a href="http://docs.codehaus.org/display/JETTY/JAAS">http://docs.codehaus.org/display/JETTY/JAAS</a>. + </p> + <P> + To authenticate successfully with this demonstration, you must use username="me" with password="me". + All other usernames, passwords should result in authentication failure. + </P> + <A HREF="auth.html">Login</A> +</BODY> +</HTML> Added: turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/login.html URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/login.html?rev=677925&view=auto ============================================================================== --- turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/login.html (added) +++ turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/login.html Fri Jul 18 08:01:51 2008 @@ -0,0 +1,15 @@ + +<HTML><HEAD><TITLE>JAAS Authentication and Authorization Test</TITLE></HEAD> +<BODY> + <H1> Enter your username and password to login </H1> + <I> Enter login=me and password=me in order to authenticate successfully</I> + <form method="POST" action="j_security_check"> + <B>Login: </B><input type="text" name="j_username"> + <P> + <B>Password: </B><input type="password" name="j_password"> + <P> + <input type="submit" value="Login"/> + </form> + <p> +</BODY> +</HTML> Added: turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/logout.jsp URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/logout.jsp?rev=677925&view=auto ============================================================================== --- turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/logout.jsp (added) +++ turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test-jaas/logout.jsp Fri Jul 18 08:01:51 2008 @@ -0,0 +1,21 @@ +<%@ page contentType="text/html; charset=UTF-8" %> +<%@ page import="java.util.*"%> +<%@ page import="javax.servlet.*" %> +<%@ page import="javax.servlet.http.*" %> +<html> +<head> +<title>Logout</title> +</head> + +<body> + <% + HttpSession s = request.getSession(false); + s.invalidate(); + %> + <h1>Logout</h1> + + <p>You are now logged out.</p> + <a href="auth.html"/>Login</a> +</body> + +</html> Added: turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/acme-taglib.tld URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/acme-taglib.tld?rev=677925&view=auto ============================================================================== --- turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/acme-taglib.tld (added) +++ turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/acme-taglib.tld Fri Jul 18 08:01:51 2008 @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<!DOCTYPE taglib + PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" + "http://java.sun.com/j2ee/dtd/web-jsptaglibrary_1_2.dtd"> + +<taglib> + + <tlib-version>1.0</tlib-version> + <jsp-version>1.2</jsp-version> + <short-name>acme</short-name> + <uri>http://www.acme.com/taglib</uri> + <description>taglib example</description> + <listener> + <listener-class>com.acme.TagListener</listener-class> + </listener> + + <tag> + <name>date</name> + <tag-class>com.acme.DateTag</tag-class> + <body-content>TAGDEPENDENT</body-content> + <description>Display Date</description> + <attribute> + <name>tz</name> + <required>false</required> + </attribute> + </tag> + +</taglib> Added: turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/acme-taglib2.tld URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/acme-taglib2.tld?rev=677925&view=auto ============================================================================== --- turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/acme-taglib2.tld (added) +++ turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/acme-taglib2.tld Fri Jul 18 08:01:51 2008 @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<taglib xmlns="http://java.sun.com/xml/ns/j2ee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd" + version="2.0"> + <description>Acme JSP2 tags</description> + <tlib-version>1.0</tlib-version> + <short-name>acme2</short-name> + <uri>http://www.acme.com/taglib2</uri> + <tag> + <description>Simple Date formatting</description> + <name>date2</name> + <tag-class>com.acme.Date2Tag</tag-class> + <body-content>scriptless</body-content> + <variable> + <description>Day of the Month</description> + <name-given>day</name-given> + </variable> + <variable> + <description>Month of the Year</description> + <name-given>month</name-given> + </variable> + <variable> + <description>Year</description> + <name-given>year</name-given> + </variable> + <attribute> + <name>format</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> +</taglib> + Added: turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/jetty-web.xml URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/jetty-web.xml?rev=677925&view=auto ============================================================================== --- turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/jetty-web.xml (added) +++ turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/jetty-web.xml Fri Jul 18 08:01:51 2008 @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> + +<!-- +This is the jetty specific web application configuration file. When starting +a Web Application, the WEB-INF/web-jetty.xml file is looked for and if found, treated +as a org.mortbay.xml.XmlConfiguration file and is applied to the +org.mortbay.jetty.servlet.WebApplicationContext objet +--> + +<Configure class="org.mortbay.jetty.webapp.WebAppContext"> + <Call class="org.mortbay.log.Log" name="debug"><Arg>executing jetty-web.xml</Arg></Call> + <!-- <Set name="contextPath">/mycontext</Set> --> +</Configure> Added: turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/tags/CVS/Entries URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/tags/CVS/Entries?rev=677925&view=auto ============================================================================== --- turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/tags/CVS/Entries (added) +++ turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/tags/CVS/Entries Fri Jul 18 08:01:51 2008 @@ -0,0 +1,2 @@ +/panel.tag/1.1/Sat Nov 8 22:30:42 2003// +D Added: turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/tags/CVS/Repository URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/tags/CVS/Repository?rev=677925&view=auto ============================================================================== --- turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/tags/CVS/Repository (added) +++ turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/tags/CVS/Repository Fri Jul 18 08:01:51 2008 @@ -0,0 +1 @@ +core/training/osJ2eeWebTraining/exercises/webappsrc/day2jsp/WEB-INF/tags Added: turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/tags/CVS/Root URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/tags/CVS/Root?rev=677925&view=auto ============================================================================== --- turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/tags/CVS/Root (added) +++ turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/tags/CVS/Root Fri Jul 18 08:01:51 2008 @@ -0,0 +1 @@ +:ext:[EMAIL PROTECTED]:/cvsroot Added: turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/tags/panel.tag URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/tags/panel.tag?rev=677925&view=auto ============================================================================== --- turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/tags/panel.tag (added) +++ turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/tags/panel.tag Fri Jul 18 08:01:51 2008 @@ -0,0 +1,17 @@ +<%-- + - Copyright (c) 2002 The Apache Software Foundation. All rights + - reserved. +--%> +<%@ attribute name="color" %> +<%@ attribute name="bgcolor" %> +<%@ attribute name="title" %> +<table border="1" bgcolor="${color}"> + <tr> + <td><b>${title}</b></td> + </tr> + <tr> + <td bgcolor="${bgcolor}"> + <jsp:doBody/> + </td> + </tr> +</table> Added: turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/web.xml?rev=677925&view=auto ============================================================================== --- turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/web.xml (added) +++ turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/WEB-INF/web.xml Fri Jul 18 08:01:51 2008 @@ -0,0 +1,305 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<web-app + xmlns="http://java.sun.com/xml/ns/javaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" + version="2.5"> + + <display-name>Test WebApp</display-name> + + <listener> + <listener-class>com.acme.TestListener</listener-class> + </listener> + + <filter> + <filter-name>TestFilter</filter-name> + <filter-class>com.acme.TestFilter</filter-class> + </filter> + + <filter-mapping> + <filter-name>TestFilter</filter-name> + <url-pattern>/dump/*</url-pattern> + <url-pattern>/dispatch/*</url-pattern> + <url-pattern>*.dump</url-pattern> + <servlet-name>*</servlet-name> + <dispatcher>REQUEST</dispatcher> + <dispatcher>FORWARD</dispatcher> + <dispatcher>INCLUDE</dispatcher> + <dispatcher>ERROR</dispatcher> + </filter-mapping> + + <filter> + <filter-name>MultiPart</filter-name> + <filter-class>org.mortbay.servlet.MultiPartFilter</filter-class> + <init-param> + <param-name>deleteFiles</param-name> + <param-value>true</param-value> + </init-param> + </filter> + <filter-mapping> + <filter-name>MultiPart</filter-name> + <url-pattern>/dump/*</url-pattern> + </filter-mapping> + + <filter> + <filter-name>GzipFilter</filter-name> + <filter-class>org.mortbay.servlet.jetty.IncludableGzipFilter</filter-class> + <init-param> + <param-name>bufferSize</param-name> + <param-value>8192</param-value> + </init-param> + <init-param> + <param-name>minGzipSize</param-name> + <param-value>1024</param-value> + </init-param> + <init-param> + <param-name>userAgent</param-name> + <param-value>(?:Mozilla[^\(]*\(compatible;\s*+([^;]*);.*)|(?:.*?([^\s]+/[^\s]+).*)</param-value> + </init-param> + <init-param> + <param-name>cacheSize</param-name> + <param-value>1024</param-value> + </init-param> + <init-param> + <param-name>excludedAgents</param-name> + <param-value>MSIE 6.0</param-value> + </init-param> + </filter> + <filter-mapping> + <filter-name>GzipFilter</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + + + <filter> + <filter-name>Throttle</filter-name> + <filter-class>org.mortbay.servlet.ThrottlingFilter</filter-class> + </filter> + + <filter-mapping> + <filter-name>Throttle</filter-name> + <url-pattern>/dump/throttle/*</url-pattern> + </filter-mapping> + + <!-- Comment out to support PUT and DELETE + <filter> + <filter-name>RestFilter</filter-name> + <filter-class>org.mortbay.servlet.RestFilter</filter-class> + <init-param> + <param-name>maxPutSize</param-name><param-value>1024</param-value> + </init-param> + </filter> + + <filter-mapping> + <filter-name>RestFilter</filter-name> + <servlet-name>default</servlet-name> + <dispatcher>REQUEST</dispatcher> + </filter-mapping> + --> + + + <servlet> + <servlet-name>Hello</servlet-name> + <servlet-class>com.acme.HelloWorld</servlet-class> + <load-on-startup>1</load-on-startup> + </servlet> + + <servlet-mapping> + <servlet-name>Hello</servlet-name> + <url-pattern>/hello/*</url-pattern> + </servlet-mapping> + + <servlet> + <servlet-name>Dump</servlet-name> + <servlet-class>com.acme.Dump</servlet-class> + <load-on-startup>1</load-on-startup> + <run-as><role-name>admin</role-name></run-as> + </servlet> + + <servlet-mapping> + <servlet-name>Dump</servlet-name> + <url-pattern>/dump/*</url-pattern> + <url-pattern>*.dump</url-pattern> + </servlet-mapping> + + <servlet> + <servlet-name>Session</servlet-name> + <servlet-class>com.acme.SessionDump</servlet-class> + <load-on-startup>1</load-on-startup> + </servlet> + + <servlet-mapping> + <servlet-name>Session</servlet-name> + <url-pattern>/session/*</url-pattern> + </servlet-mapping> + + <servlet> + <servlet-name>Cookie</servlet-name> + <servlet-class>com.acme.CookieDump</servlet-class> + <load-on-startup>1</load-on-startup> + </servlet> + + <servlet-mapping> + <servlet-name>Cookie</servlet-name> + <url-pattern>/cookie/*</url-pattern> + </servlet-mapping> + + <servlet> + <servlet-name>Dispatch</servlet-name> + <servlet-class>com.acme.DispatchServlet</servlet-class> + <load-on-startup>1</load-on-startup> + </servlet> + + <servlet-mapping> + <servlet-name>Dispatch</servlet-name> + <url-pattern>/dispatch/*</url-pattern> + </servlet-mapping> + + <servlet> + <servlet-name>JspSnoop</servlet-name> + <jsp-file>/snoop.jsp</jsp-file> + <load-on-startup>1</load-on-startup> + </servlet> + + <servlet-mapping> + <servlet-name>JspSnoop</servlet-name> + <url-pattern>/jspsnoop/*</url-pattern> + </servlet-mapping> + + <servlet> + <servlet-name>CGI</servlet-name> + <servlet-class>org.mortbay.servlet.CGI</servlet-class> + <load-on-startup>1</load-on-startup> + </servlet> + + <servlet-mapping> + <servlet-name>CGI</servlet-name> + <url-pattern>/cgi-bin/*</url-pattern> + </servlet-mapping> + + <servlet> + <servlet-name>Concat</servlet-name> + <servlet-class>org.mortbay.servlet.ConcatServlet</servlet-class> + <init-param> + <param-name>development</param-name> + <param-value>true</param-value> + </init-param> + + <load-on-startup>1</load-on-startup> + </servlet> + + <servlet-mapping> + <servlet-name>Concat</servlet-name> + <url-pattern>/concat</url-pattern> + </servlet-mapping> + + <error-page> + <error-code>404</error-code> + <location>/jspsnoop/ERROR/404</location> + </error-page> + + <error-page> + <exception-type>java.io.IOException</exception-type> + <location>/jspsnoop/IOException</location> + </error-page> + + <security-constraint> + <web-resource-collection> + <web-resource-name>Any User</web-resource-name> + <url-pattern>/dump/auth/*</url-pattern> + <url-pattern>*.htm</url-pattern> + </web-resource-collection> + <auth-constraint> + <role-name>*</role-name> + </auth-constraint> + </security-constraint> + + <security-constraint> + <web-resource-collection> + <web-resource-name>relax</web-resource-name> + <url-pattern>/dump/auth/relax/*</url-pattern> + <url-pattern>/auth/relax.txt</url-pattern> + <http-method>GET</http-method> + <http-method>HEAD</http-method> + </web-resource-collection> + </security-constraint> + + <security-constraint> + <web-resource-collection> + <web-resource-name>Admin Role</web-resource-name> + <url-pattern>/dump/auth/admin/*</url-pattern> + </web-resource-collection> + <auth-constraint> + <role-name>content-administrator</role-name> + </auth-constraint> + </security-constraint> + + <security-constraint> + <web-resource-collection> + <web-resource-name>Forbidden</web-resource-name> + <url-pattern>/dump/auth/noaccess/*</url-pattern> + <url-pattern>/auth/*</url-pattern> + </web-resource-collection> + <auth-constraint/> + </security-constraint> + + <security-constraint> + <web-resource-collection> + <web-resource-name>SSL</web-resource-name> + <url-pattern>/dump/auth/ssl/*</url-pattern> + </web-resource-collection> + <user-data-constraint> + <transport-guarantee>CONFIDENTIAL</transport-guarantee> + </user-data-constraint> + </security-constraint> + +<!-- + <login-config> + <auth-method>BASIC</auth-method> + <realm-name>Test Realm</realm-name> + </login-config> +--> + +<!-- + <login-config> + <auth-method>DIGEST</auth-method> + <realm-name>Test Realm</realm-name> + </login-config> +--> + + <login-config> + <auth-method>FORM</auth-method> + <realm-name>Test Realm</realm-name> + <form-login-config> + <form-login-page>/logon.html?param=test</form-login-page> + <form-error-page>/logonError.html?param=test</form-error-page> + </form-login-config> + </login-config> + + <jsp-config> + <taglib> + <taglib-uri> + http://www.acme.com/taglib + </taglib-uri> + <taglib-location> + /WEB-INF/acme-taglib.tld + </taglib-location> + </taglib> + + <taglib> + <taglib-uri> + http://www.acme.com/taglib2 + </taglib-uri> + <taglib-location> + /WEB-INF/acme-taglib2.tld + </taglib-location> + </taglib> + </jsp-config> + + <session-config> + <session-timeout>5</session-timeout> + </session-config> + +</web-app> + + Added: turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/auth/file.txt URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/auth/file.txt?rev=677925&view=auto ============================================================================== --- turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/auth/file.txt (added) +++ turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/auth/file.txt Fri Jul 18 08:01:51 2008 @@ -0,0 +1,10 @@ +0000 0000000000000000000000000000000000000000000000000000000 +0001 0000000000000000000000000000000000000000000000000000000 +0002 0000000000000000000000000000000000000000000000000000000 +0003 0000000000000000000000000000000000000000000000000000000 +0004 0000000000000000000000000000000000000000000000000000000 +0005 0000000000000000000000000000000000000000000000000000000 +0006 0000000000000000000000000000000000000000000000000000000 +0007 0000000000000000000000000000000000000000000000000000000 +0008 0000000000000000000000000000000000000000000000000000000 +0009 0000000000000000000000000000000000000000000000000000000 Added: turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/auth/relax.txt URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/auth/relax.txt?rev=677925&view=auto ============================================================================== --- turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/auth/relax.txt (added) +++ turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/auth/relax.txt Fri Jul 18 08:01:51 2008 @@ -0,0 +1,10 @@ +0000 0000000000000000000000000000000000000000000000000000000 +0001 0000000000000000000000000000000000000000000000000000000 +0002 0000000000000000000000000000000000000000000000000000000 +0003 0000000000000000000000000000000000000000000000000000000 +0004 0000000000000000000000000000000000000000000000000000000 +0005 0000000000000000000000000000000000000000000000000000000 +0006 0000000000000000000000000000000000000000000000000000000 +0007 0000000000000000000000000000000000000000000000000000000 +0008 0000000000000000000000000000000000000000000000000000000 +0009 0000000000000000000000000000000000000000000000000000000 Added: turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/cgi-bin/hello.sh URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/cgi-bin/hello.sh?rev=677925&view=auto ============================================================================== --- turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/cgi-bin/hello.sh (added) +++ turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/cgi-bin/hello.sh Fri Jul 18 08:01:51 2008 @@ -0,0 +1,4 @@ +#!/bin/sh +echo "Content-Type: text/html" +echo +echo "<H1>Hello World</H1>" Propchange: turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/cgi-bin/hello.sh ------------------------------------------------------------------------------ svn:executable = * Added: turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/d.txt URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/d.txt?rev=677925&view=auto ============================================================================== --- turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/d.txt (added) +++ turbine/fulcrum/trunk/jetty/src/test/jetty/webapps/test/d.txt Fri Jul 18 08:01:51 2008 @@ -0,0 +1,10 @@ +0000 0000000000000000000000000000000000000000000000000000000 +0001 0000000000000000000000000000000000000000000000000000000 +0002 0000000000000000000000000000000000000000000000000000000 +0003 0000000000000000000000000000000000000000000000000000000 +0004 0000000000000000000000000000000000000000000000000000000 +0005 0000000000000000000000000000000000000000000000000000000 +0006 0000000000000000000000000000000000000000000000000000000 +0007 0000000000000000000000000000000000000000000000000000000 +0008 0000000000000000000000000000000000000000000000000000000 +0009 0000000000000000000000000000000000000000000000000000000
