Author: mwringe
Date: 2008-08-20 10:11:23 -0400 (Wed, 20 Aug 2008)
New Revision: 11717
Added:
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jboss/
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jboss/JB5ContainerServlet.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jboss/JB5ServletContainerContext.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jetty/
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jetty/Jetty6Handler.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jetty/Jetty6ServletContainerContext.java
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jetty/Jetty6WebAppContext.java
modules/web/trunk/web/src/test/resources/support/jetty-6.1-endpoint/
modules/web/trunk/web/src/test/resources/support/jetty-6.1-endpoint/default-servlet-mapping-war/
modules/web/trunk/web/src/test/resources/support/jetty-6.1-endpoint/default-servlet-mapping-war/WEB-INF/
modules/web/trunk/web/src/test/resources/support/jetty-6.1-endpoint/default-servlet-mapping-war/WEB-INF/web.xml
modules/web/trunk/web/src/test/resources/support/jetty-6.1-endpoint/path-mapping-war/
modules/web/trunk/web/src/test/resources/support/jetty-6.1-endpoint/path-mapping-war/WEB-INF/
modules/web/trunk/web/src/test/resources/support/jetty-6.1-endpoint/path-mapping-war/WEB-INF/web.xml
modules/web/trunk/web/src/test/resources/support/jetty-6.1-endpoint/root-path-mapping-war/
modules/web/trunk/web/src/test/resources/support/jetty-6.1-endpoint/root-path-mapping-war/WEB-INF/
modules/web/trunk/web/src/test/resources/support/jetty-6.1-endpoint/root-path-mapping-war/WEB-INF/web.xml
Modified:
modules/web/trunk/build/pom.xml
modules/web/trunk/web/pom.xml
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/tomcat/TC6ServletContainerContext.java
modules/web/trunk/web/src/test/build.xml
modules/web/trunk/web/src/test/java/org/jboss/portal/test/web/ServletTestCase.java
modules/web/trunk/web/src/test/resources/support/jboss-5.0-container-servlet/server-war/WEB-INF/web.xml
Log:
Update JBoss 5.0.x support.
Update preliminary Jetty support (not enabled by default).
Modified: modules/web/trunk/build/pom.xml
===================================================================
--- modules/web/trunk/build/pom.xml 2008-08-20 14:11:06 UTC (rev 11716)
+++ modules/web/trunk/build/pom.xml 2008-08-20 14:11:23 UTC (rev 11717)
@@ -27,7 +27,7 @@
<properties>
<version.concurrent>1.3.4</version.concurrent>
<version.sun.servlet>2.4</version.sun.servlet>
- <version.apache.tomcat>5.5.12</version.apache.tomcat>
+ <version.apache.tomcat>6.0.16</version.apache.tomcat>
<version.jetty>6.1.7</version.jetty>
<version.jboss-logging>2.0.4.GA</version.jboss-logging>
<version.apache.log4j>1.2.14</version.apache.log4j>
@@ -103,7 +103,7 @@
<version>${version.sun.servlet}</version>
</dependency>
<dependency>
- <groupId>apache-tomcat</groupId>
+ <groupId>org.apache.tomcat</groupId>
<artifactId>catalina</artifactId>
<version>${version.apache.tomcat}</version>
</dependency>
Modified: modules/web/trunk/web/pom.xml
===================================================================
--- modules/web/trunk/web/pom.xml 2008-08-20 14:11:06 UTC (rev 11716)
+++ modules/web/trunk/web/pom.xml 2008-08-20 14:11:23 UTC (rev 11717)
@@ -33,7 +33,7 @@
<artifactId>servlet-api</artifactId>
</dependency>
<dependency>
- <groupId>apache-tomcat</groupId>
+ <groupId>org.apache.tomcat</groupId>
<artifactId>catalina</artifactId>
</dependency>
<dependency>
Added:
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jboss/JB5ContainerServlet.java
===================================================================
---
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jboss/JB5ContainerServlet.java
(rev 0)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jboss/JB5ContainerServlet.java 2008-08-20
14:11:23 UTC (rev 11717)
@@ -0,0 +1,133 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.web.impl.jboss;
+
+import org.apache.catalina.ContainerServlet;
+import org.apache.catalina.Wrapper;
+import org.apache.catalina.Container;
+import org.apache.catalina.Engine;
+import org.apache.catalina.core.StandardHost;
+import org.jboss.portal.web.impl.jboss.JB5ServletContainerContext;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.ServletException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class JB5ContainerServlet extends HttpServlet implements ContainerServlet
+{
+
+ /** . */
+ private Wrapper wrapper;
+
+ /** . */
+ private JB5ServletContainerContext containerContext;
+
+ /** . */
+ private boolean started;
+
+ public Wrapper getWrapper()
+ {
+ return wrapper;
+ }
+
+ public void setWrapper(Wrapper wrapper)
+ {
+ this.wrapper = wrapper;
+
+ //
+ if (wrapper != null)
+ {
+ attemptStart();
+ }
+ else
+ {
+ attemptStop();
+ }
+ }
+
+ public void init() throws ServletException
+ {
+ started = true;
+
+ //
+ attemptStart();
+ }
+
+ public void destroy()
+ {
+ started = false;
+
+ //
+ attemptStop();
+ }
+
+ private void attemptStart()
+ {
+ if (started && wrapper != null)
+ {
+ start();
+ }
+ }
+
+ private void attemptStop()
+ {
+ if (!started || wrapper == null)
+ {
+ stop();
+ }
+ }
+
+ private void start()
+ {
+ Container container = wrapper;
+ while (container.getParent() != null)
+ {
+ container = container.getParent();
+ if (container instanceof Engine)
+ {
+ Engine engine = (Engine)container;
+ containerContext = new JB5ServletContainerContext(engine);
+ containerContext.start();
+ }
+ else if (container instanceof StandardHost)
+ {
+ StandardHost host = (StandardHost)container;
+ host.setStartChildren(true);
+ }
+ }
+ }
+
+ private void stop()
+ {
+ if (containerContext != null)
+ {
+ containerContext.stop();
+
+ //
+ containerContext = null;
+ }
+ }
+}
Added:
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jboss/JB5ServletContainerContext.java
===================================================================
---
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jboss/JB5ServletContainerContext.java
(rev 0)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jboss/JB5ServletContainerContext.java 2008-08-20
14:11:23 UTC (rev 11717)
@@ -0,0 +1,23 @@
+package org.jboss.portal.web.impl.jboss;
+
+import org.apache.catalina.Engine;
+import org.jboss.portal.web.impl.tomcat.TC6ServletContainerContext;
+
+public class JB5ServletContainerContext extends TC6ServletContainerContext{
+
+ public JB5ServletContainerContext(Engine engine)
+ {
+ super(engine);
+ }
+
+ protected void start() {
+ super.start();
+ }
+
+ protected void stop()
+ {
+ super.stop();
+ }
+
+}
+
Added:
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jetty/Jetty6Handler.java
===================================================================
---
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jetty/Jetty6Handler.java
(rev 0)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jetty/Jetty6Handler.java 2008-08-20
14:11:23 UTC (rev 11717)
@@ -0,0 +1,51 @@
+//package org.jboss.portal.web.impl.jetty;
+//
+//import java.io.IOException;
+//
+//import javax.servlet.ServletException;
+//import javax.servlet.http.HttpServlet;
+//import javax.servlet.http.HttpServletRequest;
+//import javax.servlet.http.HttpServletResponse;
+//
+//import org.jboss.portal.web.impl.DefaultServletContainerFactory;
+//import org.jboss.portal.web.impl.tomcat.TC6ServletContainerContext;
+//import org.mortbay.jetty.Server;
+//import org.mortbay.jetty.handler.AbstractHandler;
+//import org.mortbay.jetty.handler.DefaultHandler;
+//
+//public class Jetty6Handler extends AbstractHandler
+//{
+// Server server;
+// Jetty6ServletContainerContext containerContext;
+//
+// public Jetty6Handler (Server server)
+// {
+// this.server = server;
+// System.out.println("SERVER : " + server);
+// server.addHandler(this);
+// }
+//
+// protected void doStart() throws Exception {
+// super.doStart();
+// containerContext = new Jetty6ServletContainerContext(server);
+// containerContext.start();
+// }
+//
+// protected void doStop() throws Exception {
+// super.doStop();
+//
+// if (containerContext != null)
+// {
+// containerContext.stop();
+// containerContext = null;
+// }
+// }
+//
+// public void handle(String target, HttpServletRequest request,
+// HttpServletResponse response, int dispatch) throws IOException,
+// ServletException {
+// // Do Nothing for now. This doesn't actually handle anything, but needs to be a
handler
+// // to tie in the jetty lifecycle and to be able to have access to the server
object..
+// }
+//
+//}
\ No newline at end of file
Added:
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jetty/Jetty6ServletContainerContext.java
===================================================================
---
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jetty/Jetty6ServletContainerContext.java
(rev 0)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jetty/Jetty6ServletContainerContext.java 2008-08-20
14:11:23 UTC (rev 11717)
@@ -0,0 +1,259 @@
+//package org.jboss.portal.web.impl.jetty;
+//
+//import java.io.IOException;
+//import java.util.HashSet;
+//import java.util.Set;
+//
+//import javax.servlet.ServletContext;
+//import javax.servlet.ServletContextEvent;
+//import javax.servlet.ServletContextListener;
+//import javax.servlet.ServletException;
+//import javax.servlet.http.HttpServletRequest;
+//import javax.servlet.http.HttpServletResponse;
+//
+//import org.jboss.portal.web.RequestDispatchCallback;
+//import org.jboss.portal.web.command.CommandDispatcher;
+//import org.jboss.portal.web.impl.DefaultServletContainerFactory;
+//import org.jboss.portal.web.impl.tomcat.TC6WebAppContext;
+//import org.jboss.portal.web.spi.ServletContainerContext;
+//import org.mortbay.component.AbstractLifeCycleListener;
+//import org.mortbay.component.Container;
+//import org.mortbay.component.LifeCycleEvent;
+//import org.mortbay.component.LifeCycleListener;
+//import org.mortbay.component.Container.Relationship;
+//import org.mortbay.jetty.Handler;
+//import org.mortbay.jetty.Server;
+//import org.mortbay.jetty.handler.ContextHandlerCollection;
+//import org.mortbay.jetty.webapp.WebAppContext;
+//
+//public class Jetty6ServletContainerContext implements ServletContainerContext,
org.mortbay.component.Container.Listener, LifeCycleListener
+//{
+//
+// private Registration registration;
+//
+// private Container container;
+// private Server server;
+// private ContextHandlerCollection chc;
+//
+// /** The monitored contexts. */
+// private final Set<String> monitoredContexts = new HashSet<String>();
+//
+// private final Set<String> monitoredContextHandlerCollection = new
HashSet<String>();
+//
+// public Jetty6ServletContainerContext(Server server) {
+// this.server = server;
+// this.container = server.getContainer();
+// }
+//
+// /** . */
+// private final CommandDispatcher dispatcher = new CommandDispatcher();
+//
+// public Object include(ServletContext targetServletContext,
+// HttpServletRequest request, HttpServletResponse response,
+// RequestDispatchCallback callback, Object handback)
+// throws ServletException, IOException
+// {
+// return dispatcher.include(targetServletContext, request, response,
+// callback, handback);
+// }
+//
+// public void setCallback(Registration registration) {
+// this.registration = registration;
+// }
+//
+// public void unsetCallback(Registration registration) {
+// this.registration = null;
+// }
+//
+//
+// public void start()
+// {
+// DefaultServletContainerFactory.registerContext(this);
+//
+// Handler[] children =
server.getChildHandlersByClass(ContextHandlerCollection.class);
+// for (int i = 0; i < children.length; i++)
+// {
+// ContextHandlerCollection chc = (ContextHandlerCollection)children[i];
+// registerContextHandlerCollection(chc);
+// }
+// container.addEventListener(this);
+// }
+//
+// public void stop()
+// {
+// container.removeEventListener(this);
+//
+// Handler[] children = server.getChildHandlersByClass(ContextHandlerCollection.class);
+// for (int i=0; i< children.length; i++)
+// {
+// ContextHandlerCollection chc = (ContextHandlerCollection)children[i];
+// unregisterContextHandlerCollection(chc);
+// }
+//
+// registration.cancel();
+// registration = null;
+// }
+//
+// public void addBean(Object bean)
+// {
+// if (bean instanceof ContextHandlerCollection)
+// {
+// ContextHandlerCollection chc = (ContextHandlerCollection)bean;
+// registerContextHandlerCollection(chc);
+// }
+// else if (bean instanceof WebAppContext)
+// {
+// WebAppContext wac = (WebAppContext)bean;
+// registerWebAppContext(wac);
+// }
+// }
+//
+// public void removeBean(Object bean)
+// {
+// if (bean instanceof ContextHandlerCollection)
+// {
+// ContextHandlerCollection chc = (ContextHandlerCollection)bean;
+// unregisterContextHandlerCollection(chc);
+// }
+// else if (bean instanceof WebAppContext)
+// {
+// WebAppContext wac = (WebAppContext)bean;
+// unregisterWebAppContext(wac);
+// }
+// }
+//
+// public void add(Relationship relationship)
+// {
+// //ignore event for now
+// }
+//
+// public void remove(Relationship relationship)
+// {
+// //ignore event for now
+// }
+//
+// private void startWebAppContext(WebAppContext webappContext)
+// {
+// try
+// {
+// Jetty6WebAppContext context = new Jetty6WebAppContext(webappContext);
+//
+// //
+// if (registration != null)
+// {
+// registration.registerWebApp(context);
+// }
+// }
+// catch (Exception e)
+// {
+// e.printStackTrace();
+// }
+//
+// }
+//
+// private void stopWebAppContext(WebAppContext webappContext)
+// {
+// try
+// {
+// if (registration != null)
+// {
+// registration.unregisterWebApp(webappContext.getContextPath());
+// }
+// }
+// catch (Exception e)
+// {
+// e.printStackTrace();
+// }
+// }
+//
+// private void registerWebAppContext(WebAppContext wac)
+// {
+// // using servletContext since its the standard object and not jetty specific
+// // (need standard object when using ServletContextListener).
+// if (!monitoredContexts.contains(wac.getServletContext().getServletContextName()))
+// {
+// wac.addLifeCycleListener(this);
+// if (wac.isStarted())
+// {
+// startWebAppContext(wac);
+// }
+//
+// monitoredContexts.add(wac.getContextPath());
+// }
+// }
+//
+// private void unregisterWebAppContext(WebAppContext wac)
+// {
+// System.out.println("UNREGISTERWEBAPPCONTEXT : " + wac);
+// if (monitoredContexts.contains(wac.getServletContext().getServletContextName()))
+// {
+// monitoredContexts.remove(wac.getServletContext().getServletContextName());
+//
+// //
+// if (wac.isStarted())
+// {
+// stopWebAppContext(wac);
+// }
+//
+// //TODO: remove event listener from the webappcontext
+// wac.removeLifeCycleListener(this);
+// }
+// }
+//
+// private void registerContextHandlerCollection(ContextHandlerCollection chc)
+// {
+// if (!monitoredContextHandlerCollection.contains(chc.toString()))
+// {
+// Handler[] children = chc.getChildHandlersByClass(WebAppContext.class);
+// for (int i = 0; i < children.length; i++)
+// {
+// WebAppContext webAppContext = (WebAppContext)children[i];
+// registerWebAppContext(webAppContext);
+// }
+// }
+//
+// monitoredContextHandlerCollection.add(chc.toString());
+// }
+//
+// private void unregisterContextHandlerCollection(ContextHandlerCollection chc)
+// {
+// if (monitoredContextHandlerCollection.contains(chc.toString()))
+// {
+// monitoredContextHandlerCollection.remove(chc.toString());
+//
+// Handler[] children = chc.getChildHandlersByClass(WebAppContext.class);
+// for (int i = 0; i < children.length; i++)
+// {
+// WebAppContext webAppContext = (WebAppContext)children[i];
+// unregisterWebAppContext(webAppContext);
+// }
+// }
+// }
+//
+// public void failedEvent(LifeCycleEvent lce)
+// {
+// //ignore event for now
+// }
+//
+// public void startingEvent(LifeCycleEvent lce)
+// {
+// //ignore event for now
+// }
+//
+// public void startedEvent(LifeCycleEvent lce)
+// {
+// startWebAppContext((WebAppContext)lce.getLifeCycleComponent());
+// }
+//
+// public void stoppedEvent(LifeCycleEvent lce)
+// {
+// stopWebAppContext((WebAppContext)lce.getLifeCycleComponent());
+// }
+//
+// public void stoppingEvent(LifeCycleEvent lce)
+// {
+// //ignore event for now
+// }
+//
+//}
+//
Added:
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jetty/Jetty6WebAppContext.java
===================================================================
---
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jetty/Jetty6WebAppContext.java
(rev 0)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/jetty/Jetty6WebAppContext.java 2008-08-20
14:11:23 UTC (rev 11717)
@@ -0,0 +1,125 @@
+///******************************************************************************
+// * JBoss, a division of Red Hat *
+// * Copyright 2006, Red Hat Middleware, LLC, and individual *
+// * contributors as indicated by the @authors tag. See the *
+// * copyright.txt in the distribution for a full listing of *
+// * individual contributors. *
+// * *
+// * This is free software; you can redistribute it and/or modify it *
+// * under the terms of the GNU Lesser General Public License as *
+// * published by the Free Software Foundation; either version 2.1 of *
+// * the License, or (at your option) any later version. *
+// * *
+// * This software is distributed in the hope that it will be useful, *
+// * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+// * Lesser General Public License for more details. *
+// * *
+// * You should have received a copy of the GNU Lesser General Public *
+// * License along with this software; if not, write to the Free *
+// * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+// * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+// ******************************************************************************/
+//package org.jboss.portal.web.impl.jetty;
+//
+//import org.w3c.dom.Document;
+//import org.jboss.portal.web.command.CommandServlet;
+//import org.jboss.portal.web.spi.WebAppContext;
+//import org.mortbay.jetty.handler.ContextHandlerCollection;
+//import org.mortbay.jetty.servlet.Context;
+//import org.mortbay.jetty.servlet.ServletHolder;
+//
+//import javax.servlet.ServletContext;
+//import java.io.InputStream;
+//import java.io.IOException;
+//
+//public class Jetty6WebAppContext implements WebAppContext
+//{
+//
+// /** The logger. */
+//// protected final Logger log = Logger.getLogger(getClass());
+//
+// /** . */
+// private Document descriptor;
+//
+// /** . */
+// private ServletContext servletContext;
+//
+// /** . */
+// private ClassLoader loader;
+//
+// /** . */
+// private String contextPath;
+//
+// /** . */
+// private final Context context;
+//
+// /** . */
+// private ServletHolder commandServlet;
+//
+// Jetty6WebAppContext(Context context) throws Exception
+// {
+// this.context = context;
+// //
+// servletContext = context.getServletContext();
+// loader = context.getClassLoader();
+// contextPath = context.getContextPath();
+// }
+//
+// public void start() throws Exception
+// {
+// try
+// {
+// commandServlet = new ServletHolder();
+// commandServlet.setName("JBossServlet");
+// commandServlet.setInitOrder(0);
+// commandServlet.setClassName(CommandServlet.class.getName());
+// context.addServlet(commandServlet, "/jbossportlet");
+// }
+// catch (Exception e)
+// {
+// cleanup();
+// throw e;
+// }
+// }
+//
+// public void stop()
+// {
+// cleanup();
+// }
+//
+// private void cleanup()
+// {
+// if (commandServlet != null)
+// {
+// try
+// {
+// commandServlet.getServletHandler();
+// commandServlet.stop();
+// }
+// catch (Exception e)
+// {
+// }
+// }
+// }
+//
+// public ServletContext getServletContext()
+// {
+// return servletContext;
+// }
+//
+// public ClassLoader getClassLoader()
+// {
+// return loader;
+// }
+//
+// public String getContextPath()
+// {
+// return contextPath;
+// }
+//
+// public boolean importFile(String parentDirRelativePath, String name, InputStream
source, boolean overwrite) throws IOException
+// {
+// return false;
+// }
+//}
Modified:
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/tomcat/TC6ServletContainerContext.java
===================================================================
---
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/tomcat/TC6ServletContainerContext.java 2008-08-20
14:11:06 UTC (rev 11716)
+++
modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/tomcat/TC6ServletContainerContext.java 2008-08-20
14:11:23 UTC (rev 11717)
@@ -146,7 +146,7 @@
}
}
- void start()
+ protected void start()
{
DefaultServletContainerFactory.registerContext(this);
@@ -165,7 +165,7 @@
engine.addContainerListener(this);
}
- void stop()
+ protected void stop()
{
engine.removeContainerListener(this);
Modified: modules/web/trunk/web/src/test/build.xml
===================================================================
--- modules/web/trunk/web/src/test/build.xml 2008-08-20 14:11:06 UTC (rev 11716)
+++ modules/web/trunk/web/src/test/build.xml 2008-08-20 14:11:23 UTC (rev 11717)
@@ -28,7 +28,7 @@
<antcall target="tests.jboss5"/>
<antcall target="tests.jboss"/>
<antcall target="tests.tomcat"/>
- <antcall target="tests.jetty"/>
+<!-- <antcall target="tests.jetty"/> -->
</target>
<target name="tests.call.single" if="tests">
@@ -46,7 +46,7 @@
<antcall target="tests.tomcat-6.0"/>
</target>
<target name="tests.jetty">
- <antcall target="tests.jetty-6"/>
+ <antcall target="tests.jetty-6.1"/>
</target>
<target name="prepare_env">
@@ -162,7 +162,7 @@
</condition>
</fail>
- <fail message="Please set the environment variable
JETTY_6_1_HOME">
+<!-- <fail message="Please set the environment variable
JETTY_6_1_HOME">
<condition>
<and>
<not>
@@ -173,7 +173,7 @@
</not>
</and>
</condition>
- </fail>
+ </fail> -->
</target>
@@ -329,24 +329,21 @@
</jar>
<!-- **************************** -->
- <!-- Jetty 6.1 container servlet -->
+ <!-- Jetty 6.1 handler -->
<!-- **************************** -->
- <copy
todir="${test.support}/jetty-6.1-container-servlet/server-war/WEB-INF/lib"
flatten="true">
+ <copy todir="${test.support}/jetty-6.1-handler/server-war/WEB-INF/lib"
flatten="true">
<path refid="jetty-6.1"/>
</copy>
- <mkdir dir="${test.temp.lib}/jetty-6.1-container-servlet"/>
+ <mkdir dir="${test.temp.lib}/jetty-6.1-handler"/>
+ <war
jarfile="${test.temp.lib}/jetty-6.1-handler/test-spi-server.war">
+ <fileset dir="${test.support}/jetty-6.1-handler/server-war"/>
+ <lib dir="${test.temp.lib}"
includes="portal-test-spi-lib.jar"/>
+ </war>
+ <jar
jarfile="${test.temp.lib}/jetty-6.1-handler/test-spi-app.war">
+ <fileset dir="${target}/test-classes/spi/app-war"/>
+ </jar>
- <!-- **************************** -->
- <!-- Jetty 6.1 lifecyle listener -->
- <!-- **************************** -->
-
-
- <copy
todir="${test.support}/jetty-6.1-lifecycle-listener/server-war/WEB-INF/lib"
flatten="true">
- <path refid="jetty-6.1"/>
- </copy>
- <mkdir dir="${test.temp.lib}/jetty-6.1-lifecycle-listener"/>
-
<!-- ****************** -->
<!-- Jetty 6.1 generic -->
<!-- ****************** -->
@@ -357,6 +354,13 @@
<path refid="jetty-6.1"/>
</copy>
<mkdir dir="${test.temp.lib}/jetty-6.1-generic"/>
+ <war
jarfile="${test.temp.lib}/jetty-6.1-generic/test-spi-server.war">
+ <fileset dir="${test.support}/jetty-6.1-generic/server-war"/>
+ <lib dir="${test.temp.lib}"
includes="portal-test-spi-lib.jar"/>
+ </war>
+ <jar
jarfile="${test.temp.lib}/jetty-6.1-generic/test-spi-app.war">
+ <fileset dir="${target}/test-classes/spi/generic/app-war"/>
+ </jar>
<!-- *************************** -->
<!-- JBoss 4.2 container servlet -->
@@ -488,28 +492,32 @@
<!-- ********* -->
<!-- JETTY 6.1 -->
<!-- ********* -->
- <war
jarfile="${test.temp.lib}/jetty-6.1-container-servlet/test-spi-server.war">
- <fileset
dir="${test.support}/jetty-6.1-container-servlet/server-war"/>
- <lib dir="${test.temp.lib}"
includes="portal-test-spi-lib.jar"/>
+ <mkdir dir="${test.temp.lib}/jetty-6.1"/>
+
+ <copy
todir="${test.support}/jetty-6.1-endpoint/default-servlet-mapping-war/WEB-INF/lib"
flatten="true">
+ <path refid="jetty-6.1"/>
+ </copy>
+ <war
jarfile="${test.temp.lib}/jetty-6.1/default-servlet-mapping.war">
+ <fileset
dir="${test.support}/jetty-6.1-endpoint/default-servlet-mapping-war"/>
+ <lib dir="${test.temp.lib}"
includes="portal-test-endpoint-lib.jar"/>
</war>
- <jar
jarfile="${test.temp.lib}/jetty-6.1-container-servlet/test-spi-app.war">
- <fileset dir="${target}/test-classes/spi/app-war"/>
- </jar>
- <jar
jarfile="${test.temp.lib}/jetty-6.1-container-servlet/test-spi-app.war">
- <fileset dir="${target}/test-classes/spi/app-war"/>
- </jar>
- <war
jarfile="${test.temp.lib}/jetty-6.1-generic/test-spi-server.war">
- <fileset dir="${test.support}/jetty-6.1-generic/server-war"/>
- <lib dir="${test.temp.lib}"
includes="portal-test-spi-lib.jar"/>
+
+ <copy
todir="${test.support}/jetty-6.1-endpoint/path-mapping-war/WEB-INF/lib"
flatten="true">
+ <path refid="jetty-6.1"/>
+ </copy>
+ <war jarfile="${test.temp.lib}/jetty-6.1/path-mapping.war">
+ <fileset
dir="${test.support}/jetty-6.1-endpoint/path-mapping-war"/>
+ <lib dir="${test.temp.lib}"
includes="portal-test-endpoint-lib.jar"/>
</war>
- <jar
jarfile="${test.temp.lib}/jetty-6.1-generic/test-spi-app.war">
- <fileset dir="${target}/test-classes/spi/generic/app-war"/>
- </jar>
- <war
jarfile="${test.temp.lib}/jetty-6.1-container-servlet/test-request-server.war">
- <fileset
dir="${test.support}/jetty-6.1-container-servlet/server-war"/>
- <lib dir="${test.temp.lib}"
includes="portal-test-request-lib.jar"/>
- </war>
+ <copy
todir="${test.support}/jetty-6.1-endpoint/root-path-mapping-war/WEB-INF/lib"
flatten="true">
+ <path refid="jetty-6.1"/>
+ </copy>
+ <war jarfile="${test.temp.lib}/jetty-6.1/root-path-mapping.war">
+ <fileset
dir="${test.support}/jetty-6.1-endpoint/root-path-mapping-war"/>
+ <lib dir="${test.temp.lib}"
includes="portal-test-endpoint-lib.jar"/>
+ </war>
+
<!-- ********* -->
<!-- JBoss 4.2 -->
<!-- ********* -->
@@ -853,7 +861,6 @@
<configuration>
<property name="cargo.servlet.port" value="8080"/>
<property name="cargo.logging" value="high"/>
- <property name="cargo.jvmargs" value="-Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8222"/>
<!--<property name="cargo.jvmargs" value="-Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"/>-->
<deployable type="war"
file="${test.temp.lib}/manager.war"/>
@@ -928,10 +935,26 @@
</antcall>
</target>
- <target name="cargo.jetty-6.start" depends="cargo.setup">
+ <target name="tests.tomcat-6.0">
+ <!-- spi tests -->
+ <antcall target="tests.tomcat-6.0.spi">
+ <param name="test.tomcat-6.0.name"
value="RemoteTomcat_6_0"/>
+ <param name="test.tomcat-6.0.home"
value="${TOMCAT_6_0_HOME}"/>
+ </antcall>
+
+ <!-- endpoint tests -->
+
+ <antcall target="tests.tomcat-6.0.endpoint">
+ <param name="test.tomcat-6.0.name"
value="RemoteTomcat_6_0"/>
+ <param name="test.tomcat-6.0.home"
value="${TOMCAT_6_0_HOME}"/>
+ </antcall>
+
+ </target>
+
+ <target name="cargo.jetty-6.1.start" depends="cargo.setup">
<cargo
containerId="jetty6x"
- home="${test.jetty-6.home}"
+ home="${test.jetty-6.1.home}"
output="${cargo.log.dir}/cargo.${test.id}.server.log"
log="${cargo.log.dir}/cargo.${test.id}.start.log"
action="start"
@@ -967,87 +990,84 @@
</cargo>
</target>
- <target name="cargo.jetty-6.stop" depends="cargo.setup">
+ <target name="cargo.jetty-6.1.stop" depends="cargo.setup">
<cargo
containerId="jetty6x"
- home="${test.jetty-6.home}"
+ home="${test.jetty-6.1.home}"
log="${cargo.log.dir}/cargo.${test.id}.shutdown.log"
action="stop">
<configuration>
</configuration>
</cargo>
</target>
-
- <target name="tests.jetty-6.container-servlet"
if="${test.jetty-6.home.variable-name}">
- <echo message="Starting Jetty 6 container-servlet tests with
${test.jetty-6.home}"/>
- <antcall target="cargo.jetty-6.start">
+
+ <target name="tests.jetty-6.1.execute"
unless="tests.jetty-6.1.execute.skip">
+ <echo message="Starting Jetty 6.1 ${test.jetty-6.1.name} with
${test.jetty-6.1.home} to execute ${test.id} tests"/>
+ <antcall target="cargo.jetty-6.1.start">
<param name="cargo.wait" value="false"/>
- <param name="test.spi.server.path"
value="${test.archive.path}"/>
<param name="cargo.war" value="${test.war}"/>
</antcall>
<antcall target="tests.remote">
- <param name="test.remote.server.name"
value="${test.jetty-6.name}"/>
+ <param name="test.remote.server.name"
value="${test.jetty-6.1.name}"/>
<param name="test.remote.archive.path"
value="${test.archive.path}"/>
</antcall>
- <antcall target="cargo.jetty-6.stop">
+ <antcall target="cargo.jetty-6.1.stop">
</antcall>
</target>
+ <target name="tests.jetty-6.1.spi">
+ <condition property="tests.jetty-6.1.execute.skip">
+ <not>
+ <available file="${test.jetty-6.1.home}"
type="dir"/>
+ </not>
+ </condition>
+ <antcall target="tests.jetty-6.1.execute">
+ <param name="test.id"
value="${test.jetty-6.1.name}-spi-handler"/>
+ <param name="test.war"
value="${test.temp.lib}/jetty-6.1-handler/test-spi-server.war"/>
+ <param name="test.archive.path"
value="jetty-6.1-handler"/>
+ </antcall>
+ <antcall target="tests.jetty-6.1.execute">
+ <param name="test.id"
value="${test.jetty-6.1.name}-spi-generic"/>
+ <param name="test.war"
value="${test.temp.lib}/jetty-6.1-generic/test-spi-server.war"/>
+ <param name="test.archive.path"
value="jetty-6.1-generic"/>
+ </antcall>
+ </target>
- <target name="tests.jetty-6.generic"
if="${test.jetty-6.home.variable-name}">
- <fail unless="test.jetty-6.home" message="Please set the
environment variable JETTY_6_1_HOME"/>
- <echo message="Starting Jetty 6 generic tests with
${test.jetty-6.home}"/>
- <antcall target="cargo.jetty-6.start">
- <param name="cargo.wait" value="false"/>
- <param name="cargo.war" value="${test.war}"/>
+ <target name="tests.jetty-6.1.endpoint">
+ <condition property="tests.jetty-6.1.execute.skip">
+ <not>
+ <available file="${test.jetty-6.1.home}"
type="dir"/>
+ </not>
+ </condition>
+ <antcall target="tests.jetty-6.1.execute">
+ <param name="test.id"
value="${test.jetty-6.1.name}-endpoint-default-servlet-mapping"/>
+ <param name="test.war"
value="${test.temp.lib}/jetty-6.1/default-servlet-mapping.war"/>
+ <param name="test.archive.path" value=""/>
</antcall>
- <antcall target="tests.remote">
- <param name="test.remote.server.name"
value="${test.jetty-6.name}"/>
- <param name="test.remote.archive.path"
value="${test.archive.path}"/>
+ <antcall target="tests.jetty-6.1.execute">
+ <param name="test.id"
value="${test.jetty-6.1.name}-endpoint-root-path-mapping"/>
+ <param name="test.war"
value="${test.temp.lib}/jetty-6.1/root-path-mapping.war"/>
+ <param name="test.archive.path" value=""/>
</antcall>
- <antcall target="cargo.jetty-6.stop">
+ <antcall target="tests.jetty-6.1.execute">
+ <param name="test.id"
value="${test.jetty-6.1.name}-endpoint-path-mapping"/>
+ <param name="test.war"
value="${test.temp.lib}/jetty-6.1/path-mapping.war"/>
+ <param name="test.archive.path" value=""/>
</antcall>
</target>
- <target name="tests.jetty-6">
-<!-- <antcall target="tests.jetty-6.container-servlet">
- <param name="test.id"
value="Jetty-6_1-spi-container-servlet"/>
- <param name="test.jetty-6.name"
value="RemoteJetty_6_1"/>
- <param name="test.jetty-6.home"
value="${JETTY_6_1_HOME}"/>
- <param name="test.jetty-6.home.variable-name"
value="JETTY_6_1_HOME"/>
- <param name="test.archive.path"
value="${test.temp.lib}/jetty-6.1-container-servlet/test-spi-server.war"/>
- </antcall> -->
- <antcall target="tests.jetty-6.generic">
- <param name="test.id" value="Jetty-6_1-spi-generic"/>
- <param name="test.jetty-6.name"
value="RemoteJetty_6_1"/>
- <param name="test.jetty-6.home"
value="${JETTY_6_1_HOME}"/>
- <param name="test.jetty-6.home.variable-name"
value="JETTY_6_1_HOME"/>
- <param name="test.war"
value="${test.temp.lib}/jetty-6.1-generic/test-spi-server.war"/>
- <param name="test.archive.path"
value="jetty-6.1-generic"/>
- </antcall>
-<!-- <antcall target="tests.jetty-6.container-servlet">
- <param name="test.id"
value="Jetty-6_0-request-container-servlet"/>
- <param name="test.jetty-6.name"
value="RemoteJetty_6_1"/>
- <param name="test.jetty-6.home"
value="${JETTY_6_1_HOME}"/>
- <param name="test.jetty-6.home.variable-name"
value="JETTY_6_1_HOME"/>
- <param name="test.archive.path"
value="jetty-6.1-container-servlet/test-request-server.war"/>
- </antcall> -->
- </target>
-
- <target name="tests.tomcat-6.0">
+ <target name="tests.jetty-6.1">
<!-- spi tests -->
- <antcall target="tests.tomcat-6.0.spi">
- <param name="test.tomcat-6.0.name"
value="RemoteTomcat_6_0"/>
- <param name="test.tomcat-6.0.home"
value="${TOMCAT_6_0_HOME}"/>
+ <antcall target="tests.jetty-6.1.spi">
+ <param name="test.jetty-6.1.name"
value="RemoteJetty_6_1"/>
+ <param name="test.jetty-6.1.home"
value="${JETTY_6_1_HOME}"/>
</antcall>
<!-- endpoint tests -->
-
- <antcall target="tests.tomcat-6.0.endpoint">
- <param name="test.tomcat-6.0.name"
value="RemoteTomcat_6_0"/>
- <param name="test.tomcat-6.0.home"
value="${TOMCAT_6_0_HOME}"/>
+ <antcall target="tests.jetty-6.1.endpoint">
+ <param name="test.jetty-6.1.name"
value="RemoteJetty_6_1"/>
+ <param name="test.jetty-6.1.home"
value="${JETTY_6_1_HOME}"/>
</antcall>
-
</target>
<target name="tests.local">
Modified:
modules/web/trunk/web/src/test/java/org/jboss/portal/test/web/ServletTestCase.java
===================================================================
---
modules/web/trunk/web/src/test/java/org/jboss/portal/test/web/ServletTestCase.java 2008-08-20
14:11:06 UTC (rev 11716)
+++
modules/web/trunk/web/src/test/java/org/jboss/portal/test/web/ServletTestCase.java 2008-08-20
14:11:23 UTC (rev 11717)
@@ -171,7 +171,7 @@
char c2 = s2.charAt(i);
if (c1 != c2)
{
- return "char at position " + i + " are diffrent " +
(int)c1 + "!=" + (int)c2;
+ return "char at position " + i + " are different " +
(int)c1 + "!=" + (int)c2;
}
}
return null;
Modified:
modules/web/trunk/web/src/test/resources/support/jboss-5.0-container-servlet/server-war/WEB-INF/web.xml
===================================================================
---
modules/web/trunk/web/src/test/resources/support/jboss-5.0-container-servlet/server-war/WEB-INF/web.xml 2008-08-20
14:11:06 UTC (rev 11716)
+++
modules/web/trunk/web/src/test/resources/support/jboss-5.0-container-servlet/server-war/WEB-INF/web.xml 2008-08-20
14:11:23 UTC (rev 11717)
@@ -39,7 +39,7 @@
</listener>
<servlet>
<servlet-name>ContainerServlet</servlet-name>
-
<servlet-class>org.jboss.portal.web.impl.tomcat.TC6ContainerServlet</servlet-class>
+
<servlet-class>org.jboss.portal.web.impl.jboss.JB5ContainerServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
Added:
modules/web/trunk/web/src/test/resources/support/jetty-6.1-endpoint/default-servlet-mapping-war/WEB-INF/web.xml
===================================================================
---
modules/web/trunk/web/src/test/resources/support/jetty-6.1-endpoint/default-servlet-mapping-war/WEB-INF/web.xml
(rev 0)
+++
modules/web/trunk/web/src/test/resources/support/jetty-6.1-endpoint/default-servlet-mapping-war/WEB-INF/web.xml 2008-08-20
14:11:23 UTC (rev 11717)
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_location</param-name>
+ <param-value>org/jboss/portal/test/web/server-beans.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_type</param-name>
+ <param-value>classloader</param-value>
+ </context-param>
+ <listener>
+
<listener-class>org.jboss.portal.common.mc.bootstrap.WebBootstrap</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>TestServlet</servlet-name>
+ <servlet-class>org.jboss.portal.test.web.TestServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TestServlet</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+</web-app>
Added:
modules/web/trunk/web/src/test/resources/support/jetty-6.1-endpoint/path-mapping-war/WEB-INF/web.xml
===================================================================
---
modules/web/trunk/web/src/test/resources/support/jetty-6.1-endpoint/path-mapping-war/WEB-INF/web.xml
(rev 0)
+++
modules/web/trunk/web/src/test/resources/support/jetty-6.1-endpoint/path-mapping-war/WEB-INF/web.xml 2008-08-20
14:11:23 UTC (rev 11717)
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_location</param-name>
+ <param-value>org/jboss/portal/test/web/server-beans.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_type</param-name>
+ <param-value>classloader</param-value>
+ </context-param>
+ <listener>
+
<listener-class>org.jboss.portal.common.mc.bootstrap.WebBootstrap</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>TestServlet</servlet-name>
+ <servlet-class>org.jboss.portal.test.web.TestServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TestServlet</servlet-name>
+ <url-pattern>/foo/*</url-pattern>
+ </servlet-mapping>
+</web-app>
Added:
modules/web/trunk/web/src/test/resources/support/jetty-6.1-endpoint/root-path-mapping-war/WEB-INF/web.xml
===================================================================
---
modules/web/trunk/web/src/test/resources/support/jetty-6.1-endpoint/root-path-mapping-war/WEB-INF/web.xml
(rev 0)
+++
modules/web/trunk/web/src/test/resources/support/jetty-6.1-endpoint/root-path-mapping-war/WEB-INF/web.xml 2008-08-20
14:11:23 UTC (rev 11717)
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_location</param-name>
+ <param-value>org/jboss/portal/test/web/server-beans.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>jboss.portal.mc.beans_resource_type</param-name>
+ <param-value>classloader</param-value>
+ </context-param>
+ <listener>
+
<listener-class>org.jboss.portal.common.mc.bootstrap.WebBootstrap</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>TestServlet</servlet-name>
+ <servlet-class>org.jboss.portal.test.web.TestServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TestServlet</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>