JBoss Portal SVN: r9640 - in modules/portlet/trunk/test: src/main/java/org/jboss/portal and 7 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-01-29 19:10:07 -0500 (Tue, 29 Jan 2008)
New Revision: 9640
Added:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/
modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/SimplePortalServlet.java
modules/portlet/trunk/test/src/test/resources/simple-portal-war/
modules/portlet/trunk/test/src/test/resources/simple-portal-war/META-INF/
modules/portlet/trunk/test/src/test/resources/simple-portal-war/META-INF/context.xml
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/classes/
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/classes/log4j.properties
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/classes/logging.properties
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/context.xml
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/jboss-beans.xml
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/jboss-web.xml
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/web.xml
Modified:
modules/portlet/trunk/test/pom.xml
modules/portlet/trunk/test/src/test/build.xml
Log:
- Beginning of effort to create a simple portal based on the portlet container.
Modified: modules/portlet/trunk/test/pom.xml
===================================================================
--- modules/portlet/trunk/test/pom.xml 2008-01-30 00:08:24 UTC (rev 9639)
+++ modules/portlet/trunk/test/pom.xml 2008-01-30 00:10:07 UTC (rev 9640)
@@ -178,14 +178,14 @@
<artifactId>web-web</artifactId>
<type>jar</type>
</dependency>
-<!--
+ <!--
+ <dependency>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-jsr168api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ -->
<dependency>
- <groupId>org.jboss.portal.portlet</groupId>
- <artifactId>portlet-jsr168api</artifactId>
- <version>${project.version}</version>
- </dependency>
--->
- <dependency>
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
</dependency>
@@ -257,62 +257,110 @@
<property name="project.version" value="${project.version}"/>
- <property name="dependency.concurrent.jar" value="${maven.dependency.concurrent.concurrent.jar.path}"/>
+ <property name="dependency.concurrent.jar"
+ value="${maven.dependency.concurrent.concurrent.jar.path}"/>
<property name="dependency.trove.jar" value="${maven.dependency.trove.trove.jar.path}"/>
- <property name="dependency.jboss-logging-spi.jar" value="${maven.dependency.jboss.jboss-logging-spi.jar.path}"/>
- <property name="dependency.jboss-logging-jdk.jar" value="${maven.dependency.jboss.jboss-logging-jdk.jar.path}"/>
- <property name="dependency.jboss-logging-log4j.jar" value="${maven.dependency.jboss.jboss-logging-log4j.jar.path}"/>
- <property name="dependency.jboss-vfs.jar" value="${maven.dependency.org.jboss.jboss-vfs.jar.path}"/>
- <property name="dependency.jboss-aop-mc-int.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-aop-mc-int.jar.path}"/>
- <property name="dependency.jboss-classloader.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-classloader.jar.path}"/>
- <property name="dependency.jboss-container.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-container.jar.path}"/>
- <property name="dependency.jboss-dependency.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-dependency.jar.path}"/>
- <property name="dependency.jboss-deployers-client-spi.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-client-spi.jar.path}"/>
- <property name="dependency.jboss-deployers-client.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-client.jar.path}"/>
- <property name="dependency.jboss-deployers-core-spi.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-core-spi.jar.path}"/>
- <property name="dependency.jboss-deployers-core.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-core.jar.path}"/>
- <property name="dependency.jboss-deployers-impl.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-impl.jar.path}"/>
- <property name="dependency.jboss-deployers-spi.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-spi.jar.path}"/>
- <property name="dependency.jboss-deployers-structure-spi.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-structure-spi.jar.path}"/>
- <property name="dependency.jboss-deployers-vfs-spi.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-vfs-spi.jar.path}"/>
- <property name="dependency.jboss-deployers-vfs.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-vfs.jar.path}"/>
- <property name="dependency.jboss-kernel.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-kernel.jar.path}"/>
- <property name="dependency.jboss-managed.jar" value="${maven.dependency.org.jboss.microcontainer.jboss-managed.jar.path}"/>
- <property name="dependency.jboss-metatype.jar" value="${maven.dependency.org.jboss.microcontainer.jboss.metatype.jar.path}"/>
- <property name="dependency.jboss-aop.jar" value="${maven.dependency.org.jboss.aop.jboss-aop.jar.path}"/>
- <property name="dependency.pluggable-instrumentor.jar" value="${maven.dependency.jboss.aop.pluggable-instrumentor.jar.path}"/>
- <property name="dependency.javassist.jar" value="${maven.dependency.org.jboss.javassist.jar.path}"/>
- <property name="dependency.jboss-common-core.jar" value="${maven.dependency.org.jboss.jboss-common-core.jar.path}"/>
- <property name="dependency.resolver.jar" value="${maven.dependency.apache-xerces.resolver.jar.path}"/>
- <property name="dependency.xercesImpl.jar" value="${maven.dependency.apache-xerces.xercesImpl.jar.path}"/>
- <property name="dependency.xml-apis.jar" value="${maven.dependency.apache-xerces.xml-apis.jar.path}"/>
+ <property name="dependency.jboss-logging-spi.jar"
+ value="${maven.dependency.jboss.jboss-logging-spi.jar.path}"/>
+ <property name="dependency.jboss-logging-jdk.jar"
+ value="${maven.dependency.jboss.jboss-logging-jdk.jar.path}"/>
+ <property name="dependency.jboss-logging-log4j.jar"
+ value="${maven.dependency.jboss.jboss-logging-log4j.jar.path}"/>
+ <property name="dependency.jboss-vfs.jar"
+ value="${maven.dependency.org.jboss.jboss-vfs.jar.path}"/>
+ <property name="dependency.jboss-aop-mc-int.jar"
+ value="${maven.dependency.org.jboss.microcontainer.jboss-aop-mc-int.jar.path}"/>
+ <property name="dependency.jboss-classloader.jar"
+ value="${maven.dependency.org.jboss.microcontainer.jboss-classloader.jar.path}"/>
+ <property name="dependency.jboss-container.jar"
+ value="${maven.dependency.org.jboss.microcontainer.jboss-container.jar.path}"/>
+ <property name="dependency.jboss-dependency.jar"
+ value="${maven.dependency.org.jboss.microcontainer.jboss-dependency.jar.path}"/>
+ <property name="dependency.jboss-deployers-client-spi.jar"
+ value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-client-spi.jar.path}"/>
+ <property name="dependency.jboss-deployers-client.jar"
+ value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-client.jar.path}"/>
+ <property name="dependency.jboss-deployers-core-spi.jar"
+ value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-core-spi.jar.path}"/>
+ <property name="dependency.jboss-deployers-core.jar"
+ value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-core.jar.path}"/>
+ <property name="dependency.jboss-deployers-impl.jar"
+ value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-impl.jar.path}"/>
+ <property name="dependency.jboss-deployers-spi.jar"
+ value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-spi.jar.path}"/>
+ <property name="dependency.jboss-deployers-structure-spi.jar"
+ value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-structure-spi.jar.path}"/>
+ <property name="dependency.jboss-deployers-vfs-spi.jar"
+ value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-vfs-spi.jar.path}"/>
+ <property name="dependency.jboss-deployers-vfs.jar"
+ value="${maven.dependency.org.jboss.microcontainer.jboss-deployers-vfs.jar.path}"/>
+ <property name="dependency.jboss-kernel.jar"
+ value="${maven.dependency.org.jboss.microcontainer.jboss-kernel.jar.path}"/>
+ <property name="dependency.jboss-managed.jar"
+ value="${maven.dependency.org.jboss.microcontainer.jboss-managed.jar.path}"/>
+ <property name="dependency.jboss-metatype.jar"
+ value="${maven.dependency.org.jboss.microcontainer.jboss.metatype.jar.path}"/>
+ <property name="dependency.jboss-aop.jar"
+ value="${maven.dependency.org.jboss.aop.jboss-aop.jar.path}"/>
+ <property name="dependency.pluggable-instrumentor.jar"
+ value="${maven.dependency.jboss.aop.pluggable-instrumentor.jar.path}"/>
+ <property name="dependency.javassist.jar"
+ value="${maven.dependency.org.jboss.javassist.jar.path}"/>
+ <property name="dependency.jboss-common-core.jar"
+ value="${maven.dependency.org.jboss.jboss-common-core.jar.path}"/>
+ <property name="dependency.resolver.jar"
+ value="${maven.dependency.apache-xerces.resolver.jar.path}"/>
+ <property name="dependency.xercesImpl.jar"
+ value="${maven.dependency.apache-xerces.xercesImpl.jar.path}"/>
+ <property name="dependency.xml-apis.jar"
+ value="${maven.dependency.apache-xerces.xml-apis.jar.path}"/>
<property name="dependency.jbossxb.jar" value="${maven.dependency.org.jboss.jbossxb.jar.path}"/>
- <property name="dependency.jboss-remoting.jar" value="${maven.dependency.jboss.jboss-remoting.jar.path}"/>
- <property name="dependency.portal-common.jar" value="${maven.dependency.org.jboss.portal.common.common-common.jar.path}"/>
- <property name="dependency.portal-common-portal.jar" value="${maven.dependency.org.jboss.portal.common.common-portal.jar.path}"/>
- <property name="dependency.portal-common-mc.jar" value="${maven.dependency.org.jboss.portal.common.common-mc.jar.path}"/>
- <property name="dependency.jboss-unit.jar" value="${maven.dependency.org.jboss.unit.jboss-unit.jar.path}"/>
- <property name="dependency.jboss-unit-mc.jar" value="${maven.dependency.org.jboss.unit.jboss-unit-mc.jar.path}"/>
- <property name="dependency.jboss-unit-remote.jar" value="${maven.dependency.org.jboss.unit.jboss-unit-remote.jar.path}"/>
- <property name="dependency.portal-test.jar" value="${maven.dependency.org.jboss.unit.portal-test.jar.path}"/>
- <property name="dependency.portal-test-generic.jar" value="${maven.dependency.org.jboss.unit.portal-test-generic.jar.path}"/>
+ <property name="dependency.jboss-remoting.jar"
+ value="${maven.dependency.jboss.jboss-remoting.jar.path}"/>
+ <property name="dependency.portal-common.jar"
+ value="${maven.dependency.org.jboss.portal.common.common-common.jar.path}"/>
+ <property name="dependency.portal-common-portal.jar"
+ value="${maven.dependency.org.jboss.portal.common.common-portal.jar.path}"/>
+ <property name="dependency.portal-common-mc.jar"
+ value="${maven.dependency.org.jboss.portal.common.common-mc.jar.path}"/>
+ <property name="dependency.jboss-unit.jar"
+ value="${maven.dependency.org.jboss.unit.jboss-unit.jar.path}"/>
+ <property name="dependency.jboss-unit-mc.jar"
+ value="${maven.dependency.org.jboss.unit.jboss-unit-mc.jar.path}"/>
+ <property name="dependency.jboss-unit-remote.jar"
+ value="${maven.dependency.org.jboss.unit.jboss-unit-remote.jar.path}"/>
+ <property name="dependency.portal-test.jar"
+ value="${maven.dependency.org.jboss.unit.portal-test.jar.path}"/>
+ <property name="dependency.portal-test-generic.jar"
+ value="${maven.dependency.org.jboss.unit.portal-test-generic.jar.path}"/>
<property name="dependency.log4j.jar" value="${maven.dependency.log4j.log4j.jar.path}"/>
- <property name="dependency.commons-logging.jar" value="${maven.dependency.commons-logging.commons-logging.jar.path}"/>
- <property name="dependency.commons-httpclient.jar" value="${maven.dependency.commons-httpclient.commons-httpclient.jar.path}"/>
- <property name="dependency.activation.jar" value="${maven.dependency.javax.activation.activation.jar.path}"/>
+ <property name="dependency.commons-logging.jar"
+ value="${maven.dependency.commons-logging.commons-logging.jar.path}"/>
+ <property name="dependency.commons-httpclient.jar"
+ value="${maven.dependency.commons-httpclient.commons-httpclient.jar.path}"/>
+ <property name="dependency.activation.jar"
+ value="${maven.dependency.javax.activation.activation.jar.path}"/>
<property name="dependency.junit.jar" value="${maven.dependency.junit.junit.jar.path}"/>
- <property name="dependency.cargo-manager.war" value="${maven.dependency.cargo.cargo-manager.war.path}"/>
- <property name="dependency.portal-web.jar" value="${maven.dependency.org.jboss.portal.web.web-web.jar.path}"/>
+ <property name="dependency.cargo-manager.war"
+ value="${maven.dependency.cargo.cargo-manager.war.path}"/>
+ <property name="dependency.portal-web.jar"
+ value="${maven.dependency.org.jboss.portal.web.web-web.jar.path}"/>
<!--<property name="dependency.jsr168api.jar" value="${maven.dependency.org.jboss.portal.portlet.portlet-jsr168api.jar.path}"/>-->
- <property name="dependency.jsr168api.jar" value="${maven.dependency.javax.portlet.portlet-api.jar.path}"/>
- <property name="dependency.portal-portlet.jar" value="${maven.dependency.org.jboss.portal.portlet.portlet-portlet.jar.path}"/>
- <property name="dependency.portal-portlet-tests.test-jar" value="${maven.dependency.org.jboss.portal.portlet.portlet-portlet.tests.test-jar.path}"/>
- <property name="dependency.cargo-core-uberjar.jar" value="${maven.dependency.cargo.cargo-core-uberjar.jar.path}"/>
+ <property name="dependency.jsr168api.jar"
+ value="${maven.dependency.javax.portlet.portlet-api.jar.path}"/>
+ <property name="dependency.portal-portlet.jar"
+ value="${maven.dependency.org.jboss.portal.portlet.portlet-portlet.jar.path}"/>
+ <property name="dependency.portal-portlet-tests.test-jar"
+ value="${maven.dependency.org.jboss.portal.portlet.portlet-portlet.tests.test-jar.path}"/>
+ <property name="dependency.cargo-core-uberjar.jar"
+ value="${maven.dependency.cargo.cargo-core-uberjar.jar.path}"/>
<property name="dependency.cargo-ant.jar" value="${maven.dependency.cargo.cargo-ant.jar.path}"/>
- <property name="dependency.jaxb-api.jar" value="${maven.dependency.javax.xml.bind.jaxb-api.jar.path}"/>
+ <property name="dependency.jaxb-api.jar"
+ value="${maven.dependency.javax.xml.bind.jaxb-api.jar.path}"/>
<ant antfile="${basedir}/src/test/build.xml">
<target name="tests"/>
+ <target name="package-simple-portal"/>
</ant>
</tasks>
Copied: modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/SimplePortalServlet.java (from rev 9512, modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortalServlet.java)
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/SimplePortalServlet.java (rev 0)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/SimplePortalServlet.java 2008-01-30 00:10:07 UTC (rev 9640)
@@ -0,0 +1,75 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.simple;
+
+import org.jboss.portal.portlet.test.PortletController;
+import org.jboss.portal.portlet.test.PortletControllerContextImpl;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class SimplePortalServlet extends HttpServlet
+{
+
+ protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
+ {
+ try
+ {
+ _service(req, resp);
+ }
+ catch (Exception e)
+ {
+ if (e instanceof ServletException)
+ {
+ throw (ServletException)e;
+ }
+ if (e instanceof IOException)
+ {
+ throw (IOException)e;
+ }
+ if (e instanceof RuntimeException)
+ {
+ throw (RuntimeException)e;
+ }
+ throw new ServletException(e);
+ }
+ }
+
+ protected void _service(HttpServletRequest req, HttpServletResponse resp) throws Exception
+ {
+ PortletControllerContextImpl context = new PortletControllerContextImpl(req, resp, getServletContext());
+
+ //
+ PortletController controller = new PortletController();
+
+ //
+ controller.process(context.getRequest());
+ }
+}
\ No newline at end of file
Modified: modules/portlet/trunk/test/src/test/build.xml
===================================================================
--- modules/portlet/trunk/test/src/test/build.xml 2008-01-30 00:08:24 UTC (rev 9639)
+++ modules/portlet/trunk/test/src/test/build.xml 2008-01-30 00:10:07 UTC (rev 9640)
@@ -41,6 +41,99 @@
<mkdir dir="${test.temp.lib}"/>
<mkdir dir="${test.temp.portlet}"/>
<mkdir dir="${target}/jboss-unit"/>
+
+ <echo message="Preparing environment"/>
+
+ <!--Paths-->
+ <path id="mc.concurrent">
+ <pathelement path="${dependency.concurrent.jar}"/>
+ </path>
+ <path id="mc.trove">
+ <pathelement path="${dependency.trove.jar}"/>
+ </path>
+ <path id="mc.xerces">
+ <pathelement path="${dependency.xercesImpl.jar}"/>
+ <pathelement path="${dependency.resolver.jar}"/>
+ <pathelement path="${dependency.xml-apis.jar}"/>
+ </path>
+ <path id="mc.javassist">
+ <pathelement path="${dependency.javassist.jar}"/>
+ </path>
+ <path id="mc.jboss_common_logging_spi">
+ <pathelement path="${dependency.jboss-logging-spi.jar}"/>
+ </path>
+ <path id="mc.jboss_common_logging_jdk">
+ <pathelement path="${dependency.jboss-logging-jdk.jar}"/>
+ </path>
+ <path id="mc.jboss_common_logging_log4j">
+ <pathelement path="${dependency.jboss-logging-log4j.jar}"/>
+ </path>
+ <path id="mc.jboss_common_core">
+ <pathelement path="${dependency.jboss-common-core.jar}"/>
+ </path>
+ <path id="mc.jboss_vfs">
+ <pathelement path="${dependency.jboss-vfs.jar}"/>
+ </path>
+ <path id="mc.jboss_xb">
+ <pathelement path="${dependency.jbossxb.jar}"/>
+ </path>
+ <path id="mc.jboss_aop">
+ <!--<pathelement path="${dependency.jboss-aop-as4-deployer.jar}"/>-->
+ <!--<pathelement path="${dependency.jboss-aop-deployer-jdk50.jar}"/>-->
+ <!--<pathelement path="${dependency.jboss-aop-jdk50.jar}"/>-->
+ <!--<pathelement path="${dependency.jboss-aop-jdk50-client.jar}"/>-->
+ <!--<pathelement path="${dependency.jboss-standalone-aspect-library-jdk50.jar}"/>-->
+ <!--<pathelement path="${dependency.jrockit-pluggable-instrumentor.jar}"/>-->
+ <!--<pathelement path="${dependency.pluggable-instrumentor.jar}"/>-->
+ <pathelement path="${dependency.jboss-aop.jar}"/>
+
+ </path>
+ <path id="mc.jboss_microcontainer">
+ <pathelement path="${dependency.jboss-aop-mc-int.jar}"/>
+ <pathelement path="${dependency.jboss-classloader.jar}"/>
+ <pathelement path="${dependency.jboss-container.jar}"/>
+ <pathelement path="${dependency.jboss-dependency.jar}"/>
+ <pathelement path="${dependency.jboss-container-metadata.jar}"/>
+ <pathelement path="${dependency.jboss-container-metadata-spi.jar}"/>
+ <pathelement path="${dependency.jboss-deployers-core.jar}"/>
+ <pathelement path="${dependency.jboss-deployers-core-spi.jar}"/>
+ <pathelement path="${dependency.jboss-deployers-client.jar}"/>
+ <pathelement path="${dependency.jboss-deployers-client-spi.jar}"/>
+ <pathelement path="${dependency.jboss-deployers-impl.jar}"/>
+ <pathelement path="${dependency.jboss-deployers-spi.jar}"/>
+ <pathelement path="${dependency.jboss-deployers-structure-spi.jar}"/>
+ <pathelement path="${dependency.jboss-deployers-vfs.jar}"/>
+ <pathelement path="${dependency.jboss-deployers-vfs-spi.jar}"/>
+ <pathelement path="${dependency.jboss-managed.jar}"/>
+ <pathelement path="${dependency.jboss-metatype.jar}"/>
+ <pathelement path="${dependency.jboss-kernel.jar}"/>
+ </path>
+ <path id="mc.portal-common">
+ <!--<pathelement path="${dependency.portal-common.jar}"/>-->
+ <pathelement path="${dependency.portal-common-mc.jar}"/>
+ </path>
+ <path id="mc.jboss-unit">
+ <pathelement path="${dependency.jboss-unit.jar}"/>
+ <pathelement path="${dependency.jboss-unit-mc.jar}"/>
+ <pathelement path="${dependency.jboss-unit-remote.jar}"/>
+ <pathelement path="${dependency.portal-test-generic.jar}"/>
+ <pathelement path="${dependency.portal-test.jar}"/>
+ </path>
+ <path id="mc.portal-test-generic">
+ <pathelement path="${dependency.portal-test-generic.jar}"/>
+ </path>
+ <path id="mc.jboss-remoting">
+ <pathelement path="${dependency.jboss-remoting.jar}"/>
+ </path>
+ <path id="mc.log4j">
+ <pathelement path="${dependency.log4j.jar}"/>
+ </path>
+ <path id="mc.portal-portlet">
+ <pathelement path="${dependency.portal-portlet.jar}"/>
+ </path>
+ <path id="mc.jaxb-api">
+ <pathelement path="${dependency.jaxb-api.jar}"/>
+ </path>
</target>
<!--Lets make the check in one place so the build fail in the beggining instead of end-->
@@ -57,6 +150,14 @@
</not>
</and>
</condition>
+ <condition property="JBOSS_4_2_2_HOME" value="${env.JBOSS_4_2_2_HOME}">
+ <and>
+ <isset property="env.JBOSS_4_2_2_HOME"/>
+ <not>
+ <isset property="JBOSS_4_2_2_HOME"/>
+ </not>
+ </and>
+ </condition>
<condition property="JBOSS_4_2_0_HOME" value="${env.JBOSS_4_2_0_HOME}">
<and>
<isset property="env.JBOSS_4_2_0_HOME"/>
@@ -74,7 +175,7 @@
</and>
</condition>
- <fail message="Please set the environment variable JBOSS_4_2_0_HOME or JBOSS_4_2_1_HOME">
+ <fail message="Please set the environment variable JBOSS_4_2_0_HOME, JBOSS_4_2_1_HOME or JBOSS_4_2_2_HOME">
<condition>
<and>
<not>
@@ -83,6 +184,9 @@
<not>
<isset property="JBOSS_4_2_1_HOME"/>
</not>
+ <not>
+ <isset property="JBOSS_4_2_2_HOME"/>
+ </not>
</and>
</condition>
</fail>
@@ -155,8 +259,10 @@
<sequential>
<mkdir dir="${target}/test-classes/@{testsuiteversion}/@{testsuitetype}/@{testsuitename}-war/WEB-INF/classes"/>
<copy todir="${target}/test-classes/@{testsuiteversion}/@{testsuitetype}/@{testsuitename}-war/WEB-INF/classes">
- <fileset dir="${test.temp.portlet}" includes="org/jboss/portal/test/portlet/@{testsuiteversion}/@{testsuitetype}/common/**"/>
- <fileset dir="${test.temp.portlet}" includes="org/jboss/portal/test/portlet/@{testsuiteversion}/@{testsuitetype}/@{testsuitename}/**"/>
+ <fileset dir="${test.temp.portlet}"
+ includes="org/jboss/portal/test/portlet/@{testsuiteversion}/@{testsuitetype}/common/**"/>
+ <fileset dir="${test.temp.portlet}"
+ includes="org/jboss/portal/test/portlet/@{testsuiteversion}/@{testsuitetype}/@{testsuitename}/**"/>
<fileset dir="${test.temp.portlet}" includes="org/jboss/portal/test/portlet/framework/**"/>
</copy>
<mkdir dir="${target}/test-classes/@{testsuiteversion}/@{testsuitetype}/@{testsuitename}-war/WEB-INF/lib"/>
@@ -173,7 +279,7 @@
<unjar src="${dependency.portal-portlet-tests.test-jar}" dest="${test.temp.portlet}"/>
- <!--Portlet test framework lib jar-->
+ <!--Portlet test framework lib jar-->
<jar jarfile="${test.temp.lib}/portal-portlet-test-framework-lib.jar">
<fileset dir="${test.temp.portlet}" includes="org/jboss/portal/unit/**"/>
@@ -185,17 +291,17 @@
</jar>
<!--<jar jarfile="${test.temp.lib}/test-info.jar">-->
- <!--<fileset dir="${test.temp.portlet}" includes="org/jboss/portal/test/portlet/info/**"/>-->
+ <!--<fileset dir="${test.temp.portlet}" includes="org/jboss/portal/test/portlet/info/**"/>-->
<!--</jar>-->
<!--<jar jarfile="${test.temp.lib}/test-info.war">-->
- <!--<fileset dir="${target}/test-classes/info/test-info-war"/>-->
+ <!--<fileset dir="${target}/test-classes/info/test-info-war"/>-->
<!--</jar>-->
<!--<jar jarfile="${test.temp.lib}/test-ha-session.war">-->
- <!--<fileset dir="${target}/test-classes/ha/test-session-war"/>-->
- <!--<fileset dir="${target}/test-classes" includes="org/jboss/portal/test/portlet/ha/session/**"/>-->
- <!--<fileset dir="${target}/test-classes" includes="org/jboss/portal/test/portlet/framework/**"/>-->
+ <!--<fileset dir="${target}/test-classes/ha/test-session-war"/>-->
+ <!--<fileset dir="${target}/test-classes" includes="org/jboss/portal/test/portlet/ha/session/**"/>-->
+ <!--<fileset dir="${target}/test-classes" includes="org/jboss/portal/test/portlet/framework/**"/>-->
<!--</jar>-->
<package-tck-test test="portletinterface"/>
@@ -257,92 +363,7 @@
<fileset dir="${target}/classes"/>
</jar>
- <path id="mc.concurrent">
- <pathelement path="${dependency.concurrent.jar}"/>
- </path>
- <path id="mc.trove">
- <pathelement path="${dependency.trove.jar}"/>
- </path>
- <path id="mc.xerces">
- <pathelement path="${dependency.xercesImpl.jar}"/>
- <pathelement path="${dependency.resolver.jar}"/>
- <pathelement path="${dependency.xml-apis.jar}"/>
- </path>
- <path id="mc.javassist">
- <pathelement path="${dependency.javassist.jar}"/>
- </path>
- <path id="mc.jboss_common_logging_spi">
- <pathelement path="${dependency.jboss-logging-spi.jar}"/>
- </path>
- <path id="mc.jboss_common_logging_jdk">
- <pathelement path="${dependency.jboss-logging-jdk.jar}"/>
- </path>
- <path id="mc.jboss_common_logging_log4j">
- <pathelement path="${dependency.jboss-logging-log4j.jar}"/>
- </path>
- <path id="mc.jboss_common_core">
- <pathelement path="${dependency.jboss-common-core.jar}"/>
- </path>
- <path id="mc.jboss_vfs">
- <pathelement path="${dependency.jboss-vfs.jar}"/>
- </path>
- <path id="mc.jboss_xb">
- <pathelement path="${dependency.jbossxb.jar}"/>
- </path>
- <path id="mc.jboss_aop">
- <!--<pathelement path="${dependency.jboss-aop-as4-deployer.jar}"/>-->
- <!--<pathelement path="${dependency.jboss-aop-deployer-jdk50.jar}"/>-->
- <!--<pathelement path="${dependency.jboss-aop-jdk50.jar}"/>-->
- <!--<pathelement path="${dependency.jboss-aop-jdk50-client.jar}"/>-->
- <!--<pathelement path="${dependency.jboss-standalone-aspect-library-jdk50.jar}"/>-->
- <!--<pathelement path="${dependency.jrockit-pluggable-instrumentor.jar}"/>-->
- <!--<pathelement path="${dependency.pluggable-instrumentor.jar}"/>-->
- <pathelement path="${dependency.jboss-aop.jar}"/>
- </path>
- <path id="mc.jboss_microcontainer">
- <pathelement path="${dependency.jboss-aop-mc-int.jar}"/>
- <pathelement path="${dependency.jboss-classloader.jar}"/>
- <pathelement path="${dependency.jboss-container.jar}"/>
- <pathelement path="${dependency.jboss-dependency.jar}"/>
- <pathelement path="${dependency.jboss-container-metadata.jar}"/>
- <pathelement path="${dependency.jboss-container-metadata-spi.jar}"/>
- <pathelement path="${dependency.jboss-deployers-core.jar}"/>
- <pathelement path="${dependency.jboss-deployers-core-spi.jar}"/>
- <pathelement path="${dependency.jboss-deployers-client.jar}"/>
- <pathelement path="${dependency.jboss-deployers-client-spi.jar}"/>
- <pathelement path="${dependency.jboss-deployers-impl.jar}"/>
- <pathelement path="${dependency.jboss-deployers-spi.jar}"/>
- <pathelement path="${dependency.jboss-deployers-structure-spi.jar}"/>
- <pathelement path="${dependency.jboss-deployers-vfs.jar}"/>
- <pathelement path="${dependency.jboss-deployers-vfs-spi.jar}"/>
- <pathelement path="${dependency.jboss-managed.jar}"/>
- <pathelement path="${dependency.jboss-metatype.jar}"/>
- <pathelement path="${dependency.jboss-kernel.jar}"/>
- </path>
- <path id="mc.portal-common">
- <pathelement path="${dependency.portal-common-mc.jar}"/>
- </path>
- <path id="mc.jboss-unit">
- <pathelement path="${dependency.jboss-unit.jar}"/>
- <pathelement path="${dependency.jboss-unit-mc.jar}"/>
- <pathelement path="${dependency.jboss-unit-remote.jar}"/>
- <pathelement path="${dependency.portal-test-generic.jar}"/>
- <pathelement path="${dependency.portal-test.jar}"/>
- </path>
- <path id="mc.portal-test-generic">
- <pathelement path="${dependency.portal-test-generic.jar}"/>
- </path>
- <path id="mc.jboss-remoting">
- <pathelement path="${dependency.jboss-remoting.jar}"/>
- </path>
- <path id="mc.log4j">
- <pathelement path="${dependency.log4j.jar}"/>
- </path>
- <path id="mc.jaxb-api">
- <pathelement path="${dependency.jaxb-api.jar}"/>
- </path>
-
<!-- JBoss 4.2 portlet-test.war -->
<copy todir="${target}/test-classes/jboss-4.2/portlet-test-war/WEB-INF/lib" flatten="true">
@@ -350,7 +371,7 @@
<fileset dir="${test.temp.lib}" includes="portlet-test-lib.jar"/>
<path refid="mc.portal-common"/>
- <!--<path location="${dependency.portal-portlet.jar}"/>-->
+ <path refid="mc.portal-portlet"/>
<!-- Remote plugin -->
<path refid="mc.jboss-remoting"/>
@@ -383,6 +404,7 @@
<fileset dir="${test.temp.lib}" includes="portlet-test-lib.jar"/>
<path refid="mc.portal-common"/>
+ <path refid="mc.portal-portlet"/>
<!-- Remote plugin -->
<path refid="mc.jboss-remoting"/>
@@ -516,11 +538,17 @@
<param name="test.jboss-4.2.home.variable-name" value="JBOSS_4_2_1_HOME"/>
<param name="test.jboss-4.2.tempdir" value="${target}/cargo-tmp/4_2_1"/>
</antcall>
+ <antcall target="tests.jboss-4.2.container-servlet">
+ <param name="test.id" value="JBoss-4_2_2-container-servlet"/>
+ <param name="test.jboss-4.2.name" value="RemoteJBoss_4_2_2"/>
+ <param name="test.jboss-4.2.home" value="${JBOSS_4_2_2_HOME}"/>
+ <param name="test.jboss-4.2.home.variable-name" value="JBOSS_4_2_2_HOME"/>
+ <param name="test.jboss-4.2.tempdir" value="${target}/cargo-tmp/4_2_2"/>
+ </antcall>
</target>
<target name="tests.jboss">
- <antcall target="tests.jboss-4.2">
- </antcall>
+ <antcall target="tests.jboss-4.2"/>
</target>
<target name="cargo.tomcat-6.start" depends="cargo.setup">
@@ -626,8 +654,61 @@
<pathelement path="${test_classpath}"/>
</classpath>
- </jboss-unit >
+ </jboss-unit>
</target>
+ <target name="package-simple-portal" depends="prepare_env">
+
+ <jar jarfile="${target}/portlet-test-lib.jar">
+ <!--<fileset dir="${target}/test-classes"/>-->
+ <fileset dir="${target}/classes"/>
+ </jar>
+
+ <!-- simple-portal.war -->
+ <copy todir="${target}/test-classes/simple-portal-war/WEB-INF/lib" flatten="true">
+
+ <!-- -->
+ <fileset dir="${target}" includes="portlet-test-lib.jar"/>
+
+ <path refid="mc.portal-common"/>
+ <path refid="mc.portal-portlet"/>
+
+ <!-- MC 2.0.0.Beta4 -->
+ <path refid="mc.trove"/>
+ <path refid="mc.javassist"/>
+ <path refid="mc.jboss_common_logging_spi"/>
+ <path refid="mc.jboss_common_logging_jdk"/>
+ <path refid="mc.jboss_common_logging_log4j"/>
+ <path refid="mc.jboss_common_core"/>
+ <path refid="mc.jboss_vfs"/>
+ <path refid="mc.jboss_xb"/>
+ <path refid="mc.jboss_aop"/>
+ <path refid="mc.jboss_microcontainer"/>
+ <path refid="mc.jaxb-api"/>
+
+ <!-- Portal dependencies -->
+ <path>
+ <pathelement path="${dependency.portal-common-portal.jar}"/>
+ <pathelement path="${dependency.portal-portlet.jar}"/>
+ </path>
+
+
+ <!-- For Tomcat -->
+ <path>
+ <pathelement path="${dependency.log4j.jar}"/>
+ <pathelement path="${dependency.activation.jar}"/>
+ <pathelement path="${dependency.xercesImpl.jar}"/>
+ </path>
+
+ </copy>
+
+ <jar jarfile="${target}/simple-portal.war">
+ <fileset dir="${target}/test-classes/simple-portal-war"/>
+ </jar>
+
+ <delete file="${target}/portlet-test-lib.jar"/>
+
+ </target>
+
</project>
\ No newline at end of file
Added: modules/portlet/trunk/test/src/test/resources/simple-portal-war/META-INF/context.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/META-INF/context.xml (rev 0)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/META-INF/context.xml 2008-01-30 00:10:07 UTC (rev 9640)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context path="/simple" privileged="true"/>
\ No newline at end of file
Copied: modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/classes/log4j.properties (from rev 9584, modules/portlet/trunk/test/src/test/resources/tomcat-6.0/portlet-test-war/WEB-INF/classes/log4j.properties)
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/classes/log4j.properties (rev 0)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/classes/log4j.properties 2008-01-30 00:10:07 UTC (rev 9640)
@@ -0,0 +1,13 @@
+### ====================================================================== ###
+## ##
+## JBoss Bootstrap Log4j Configuration ##
+## ##
+### ====================================================================== ###
+
+log4j.rootCategory=ALL, CONSOLE
+
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.Threshold=DEBUG
+log4j.appender.CONSOLE.Target=System.out
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
Copied: modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/classes/logging.properties (from rev 9584, modules/portlet/trunk/test/src/test/resources/tomcat-6.0/portlet-test-war/WEB-INF/classes/logging.properties)
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/classes/logging.properties (rev 0)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/classes/logging.properties 2008-01-30 00:10:07 UTC (rev 9640)
@@ -0,0 +1,13 @@
+handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+org.apache.juli.FileHandler.level = FINE
+org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+org.apache.juli.FileHandler.prefix = servlet-examples.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
Added: modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/context.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/context.xml (rev 0)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/context.xml 2008-01-30 00:10:07 UTC (rev 9640)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context path="/simple" privileged="true"/>
\ No newline at end of file
Added: modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/jboss-beans.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/jboss-beans.xml (rev 0)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/jboss-beans.xml 2008-01-30 00:10:07 UTC (rev 9640)
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2008, 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- An application registry mainly for listeners -->
+ <bean name="PortletApplicationRegistry"
+ class="org.jboss.portal.portlet.impl.container.PortletApplicationRegistryImpl"/>
+
+ <bean name="PortletApplicationDeployer" class="org.jboss.portal.portlet.test.PortletApplicationDeployer">
+ <property name="registry"><inject bean="PortletApplicationRegistry"/></property>
+ <property name="servletContainer"><inject bean="ServletContainer"/></property>
+ </bean>
+
+ <bean name="PortletAPIFactory" class="org.jboss.portal.portlet.impl.jsr168.PortletAPIFactoryImpl"/>
+
+ <!-- The ServletContainerFactory -->
+ <bean name="ServletContainerFactory" class="org.jboss.portal.web.impl.DefaultServletContainerFactory">
+ <constructor factoryClass="org.jboss.portal.web.impl.DefaultServletContainerFactory" factoryMethod="getInstance"/>
+ </bean>
+
+ <!-- The servlet container obtained from the ServletContainerFactory -->
+ <bean name="ServletContainer" class="org.jboss.portal.web.ServletContainer">
+ <constructor factoryMethod="getServletContainer">
+ <factory bean="ServletContainerFactory"/>
+ </constructor>
+ </bean>
+
+ <!-- Consumer stack -->
+ <bean name="ConsumerCacheInterceptor" class="org.jboss.portal.portlet.aspects.portlet.ConsumerCacheInterceptor">
+ </bean>
+ <bean name="ConsumerStackFactory" class="org.jboss.portal.portlet.test.InterceptorStackFactoryImpl">
+ <property name="interceptors">
+ <array>
+ <inject bean="ConsumerCacheInterceptor"/>
+ </array>
+ </property>
+ </bean>
+
+ <!-- The consumer portlet invoker -->
+ <bean name="ConsumerPortletInvoker" class="org.jboss.portal.portlet.test.TestPortletInvoker">
+ <property name="producer"><inject bean="ProducerPortletInvoker"/></property>
+ <property name="stackFactory"><inject bean="ConsumerStackFactory"/></property>
+ </bean>
+
+ <!-- Container stack -->
+ <bean name="ValveInterceptor" class="org.jboss.portal.portlet.aspects.portlet.ValveInterceptor"/>
+ <bean name="SecureTransportInterceptor" class="org.jboss.portal.portlet.aspects.portlet.SecureTransportInterceptor"/>
+ <bean name="ContextDispatcherInterceptor"
+ class="org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor">
+ <property name="servletContainerFactory"><inject bean="ServletContainerFactory"/></property>
+ </bean>
+ <bean name="WindowStatesInterceptor" class="org.jboss.portal.portlet.aspects.portlet.WindowStatesInterceptor"/>
+ <bean name="ModesInterceptor" class="org.jboss.portal.portlet.aspects.portlet.ModesInterceptor"/>
+ <bean name="ProducerCacheInterceptor" class="org.jboss.portal.portlet.aspects.portlet.ProducerCacheInterceptor"/>
+ <bean name="ContainerStackFactory" class="org.jboss.portal.portlet.test.InterceptorStackFactoryImpl">
+ <property name="interceptors">
+ <array>
+ <inject bean="ValveInterceptor"/>
+ <inject bean="SecureTransportInterceptor"/>
+ <inject bean="ContextDispatcherInterceptor"/>
+ <inject bean="WindowStatesInterceptor"/>
+ <inject bean="ModesInterceptor"/>
+ <inject bean="ProducerCacheInterceptor"/>
+ </array>
+ </property>
+ </bean>
+
+ <!-- The portlet container invoker -->
+ <bean name="PortletContainerInvoker" class="org.jboss.portal.portlet.container.PortletContainerInvoker">
+ <property name="stackFactory"><inject bean="ContainerStackFactory"/></property>
+ <property name="registry"><inject bean="PortletApplicationRegistry"/></property>
+ </bean>
+
+ <!-- The producer persistence manager -->
+ <bean name="ProducerPersistenceManager"
+ class="org.jboss.portal.portlet.impl.state.producer.PortletStatePersistenceManagerService"/>
+
+ <!-- The producer state management policy -->
+ <bean name="ProducerStateManagementPolicy" class="org.jboss.portal.portlet.impl.state.StateManagementPolicyService">
+ <property name="persistLocally"><value>true</value></property>
+ </bean>
+
+ <!-- The producer state converter -->
+ <bean name="ProducerStateConverter" class="org.jboss.portal.portlet.impl.state.StateConverterV0"/>
+
+ <!-- The producer portlet invoker -->
+ <bean name="ProducerPortletInvoker" class="org.jboss.portal.portlet.state.producer.ProducerPortletInvoker">
+ <property name="portletInvoker"><inject bean="PortletContainerInvoker"/></property>
+ <property name="persistenceManager"><inject bean="ProducerPersistenceManager"/></property>
+ <property name="stateManagementPolicy"><inject bean="ProducerStateManagementPolicy"/></property>
+ <property name="stateConverter"><inject bean="ProducerStateConverter"/></property>
+ </bean>
+
+</deployment>
Added: modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/jboss-web.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/jboss-web.xml (rev 0)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/jboss-web.xml 2008-01-30 00:10:07 UTC (rev 9640)
@@ -0,0 +1,26 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2008, 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 jboss-web PUBLIC "-//JBoss//DTD Web Application 4.2//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
+<jboss-web>
+ <context-root>/simple</context-root>
+</jboss-web>
Added: modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/web.xml (rev 0)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/web.xml 2008-01-30 00:10:07 UTC (rev 9640)
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2008, 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>
+ <listener>
+ <listener-class>org.jboss.portal.common.mc.bootstrap.WebBootstrap</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>ContainerServlet</servlet-name>
+ <servlet-class>org.jboss.portal.web.impl.tomcat.TC6ContainerServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>PortalServlet</servlet-name>
+ <servlet-class>org.jboss.portal.simple.SimplePortalServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>PortalServlet</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
18 years, 3 months
JBoss Portal SVN: r9639 - modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-01-29 19:08:24 -0500 (Tue, 29 Jan 2008)
New Revision: 9639
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletController.java
Log:
- Also show errors. Next step is to extract test-dependent code.
Modified: modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletController.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletController.java 2008-01-30 00:05:26 UTC (rev 9638)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletController.java 2008-01-30 00:08:24 UTC (rev 9639)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2008, 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. *
@@ -22,59 +22,61 @@
******************************************************************************/
package org.jboss.portal.portlet.test;
+import org.apache.log4j.Logger;
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.common.io.IOTools;
+import org.jboss.portal.common.util.MarkupInfo;
+import org.jboss.portal.common.util.MediaType;
+import org.jboss.portal.common.util.MultiValuedPropertyMap;
+import org.jboss.portal.common.util.ParameterMap;
+import org.jboss.portal.common.xml.XMLTools;
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.cache.CacheLevel;
-import org.jboss.portal.portlet.spi.ResourceInvocationContext;
-import org.jboss.portal.portlet.info.PortletInfo;
-import org.jboss.portal.portlet.info.EventInfo;
-import org.jboss.portal.portlet.info.ParameterInfo;
-import org.jboss.portal.portlet.info.NavigationInfo;
+import org.jboss.portal.portlet.impl.spi.AbstractClientContext;
+import org.jboss.portal.portlet.impl.spi.AbstractPortalContext;
+import org.jboss.portal.portlet.impl.spi.AbstractRequestContext;
+import org.jboss.portal.portlet.impl.spi.AbstractSecurityContext;
import org.jboss.portal.portlet.impl.spi.AbstractServerContext;
import org.jboss.portal.portlet.impl.spi.AbstractUserContext;
import org.jboss.portal.portlet.impl.spi.AbstractWindowContext;
-import org.jboss.portal.portlet.impl.spi.AbstractPortalContext;
-import org.jboss.portal.portlet.impl.spi.AbstractSecurityContext;
-import org.jboss.portal.portlet.impl.spi.AbstractRequestContext;
-import org.jboss.portal.portlet.impl.spi.AbstractClientContext;
-import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
-import org.jboss.portal.portlet.invocation.response.HTTPRedirectionResponse;
+import org.jboss.portal.portlet.info.EventInfo;
+import org.jboss.portal.portlet.info.NavigationInfo;
+import org.jboss.portal.portlet.info.ParameterInfo;
+import org.jboss.portal.portlet.info.PortletInfo;
+import org.jboss.portal.portlet.invocation.ActionInvocation;
+import org.jboss.portal.portlet.invocation.EventInvocation;
+import org.jboss.portal.portlet.invocation.RenderInvocation;
+import org.jboss.portal.portlet.invocation.ResourceInvocation;
import org.jboss.portal.portlet.invocation.response.ErrorResponse;
-import org.jboss.portal.portlet.invocation.response.StateResponse;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
+import org.jboss.portal.portlet.invocation.response.HTTPRedirectionResponse;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import org.jboss.portal.portlet.invocation.response.ResponseProperties;
-import org.jboss.portal.portlet.invocation.ActionInvocation;
-import org.jboss.portal.portlet.invocation.RenderInvocation;
-import org.jboss.portal.portlet.invocation.EventInvocation;
-import org.jboss.portal.portlet.invocation.ResourceInvocation;
+import org.jboss.portal.portlet.invocation.response.StateResponse;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
+import org.jboss.portal.portlet.spi.ResourceInvocationContext;
import org.jboss.portal.web.IllegalRequestException;
-import org.jboss.portal.common.util.ParameterMap;
-import org.jboss.portal.common.util.MarkupInfo;
-import org.jboss.portal.common.util.MediaType;
-import org.jboss.portal.common.util.MultiValuedPropertyMap;
-import org.jboss.portal.common.io.IOTools;
-import org.jboss.portal.common.xml.XMLTools;
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
-import org.apache.log4j.Logger;
import org.w3c.dom.Element;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.Cookie;
-import javax.servlet.ServletOutputStream;
import javax.xml.namespace.QName;
+import java.io.IOException;
+import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
-import java.io.PrintWriter;
-import java.io.IOException;
import java.io.Writer;
-import java.util.List;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
import java.util.LinkedList;
+import java.util.List;
import java.util.Map;
-import java.util.HashMap;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -394,7 +396,6 @@
{
StateResponse stateResponse = (StateResponse)response;
-
// Update portlet NS
if (response instanceof UpdateNavigationalStateResponse)
{
@@ -595,7 +596,6 @@
}
/**
- *
* @param context
* @param pageProperties properties that needs to be rendered on this page
* @param pageNS
@@ -609,7 +609,8 @@
HttpServletRequest req = context.getClientRequest();
HttpServletResponse resp = context.getClientResponse();
- List<FragmentResponse> fragments = new ArrayList<FragmentResponse>();
+ List<FragmentResponse> fragments = Collections.emptyList();
+ List<ErrorResponse> errors = Collections.emptyList();
// What we collect during the different renders
// we don't reuse the render properties argument since we want to avoid that
@@ -619,7 +620,13 @@
//
try
{
- for (Portlet portlet : context.getPortlets())
+ Collection<Portlet> portlets = context.getPortlets();
+
+ int capacity = portlets.size();
+ fragments = new ArrayList<FragmentResponse>(capacity);
+ errors = new ArrayList<ErrorResponse>(capacity);
+
+ for (Portlet portlet : portlets)
{
WindowNavigationalState windowNS = pageNS.getWindowNavigationalState(portlet.getContext().getId());
@@ -687,6 +694,11 @@
renderProperties.append(fragmentProperties);
}
}
+ else if (response instanceof ErrorResponse)
+ {
+ ErrorResponse error = (ErrorResponse)response;
+ errors.add(error);
+ }
}
catch (PortletInvokerException e)
@@ -741,7 +753,7 @@
{
if (fragment.getType() != FragmentResponse.TYPE_EMPTY)
{
- writer.print("<div id=\"portlet\">");
+ writer.print("<div class=\"portlet\">");
writer.print(fragment.getBuffer().getContent());
writer.print("</div>");
}
@@ -750,6 +762,14 @@
writer.print("<div/>");
}
}
+
+ for (ErrorResponse error : errors)
+ {
+ writer.print("<div class='error'>");
+ writer.print(error.toHTML());
+ writer.print("</div>");
+ }
+
writer.print("</body></html>");
}
18 years, 3 months
JBoss Portal SVN: r9638 - in modules/portlet/trunk/test/src: test/resources/portlet-test-war/WEB-INF and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-01-29 19:05:26 -0500 (Tue, 29 Jan 2008)
New Revision: 9638
Added:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestPortletApplicationDeployer.java
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployer.java
modules/portlet/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-beans.xml
Log:
- Extracted driver from PortletApplicationDeployer to make it reusable outside of tests.
- Introduced TestPortletApplicationDeployer for tests.
- Updated porlet-test-war jboss-beans.xml to use correct URN for namespace and TestPortletApplicationDeployer.
Modified: modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployer.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployer.java 2008-01-29 23:20:28 UTC (rev 9637)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployer.java 2008-01-30 00:05:26 UTC (rev 9638)
@@ -103,19 +103,6 @@
private final Map<PortletApplication, PortletApplicationRegistrationContext> registrationContextMap =
new HashMap<PortletApplication, PortletApplicationRegistrationContext>();
- /** . */
- private Object driver;
-
- public Object getDriver()
- {
- return driver;
- }
-
- public void setDriver(Object driver)
- {
- this.driver = driver;
- }
-
public PortletApplicationRegistry getRegistry()
{
return registry;
@@ -165,11 +152,8 @@
}
}
- private void add(WebApp webApp)
+ protected void add(WebApp webApp)
{
- // Set the driver for the web app
- webApp.getServletContext().setAttribute("TestDriverServer", driver);
-
//
PortletApplication10MetaData metaData = buildPortletApplicationMetaData(webApp);
if (metaData != null)
Added: modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestPortletApplicationDeployer.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestPortletApplicationDeployer.java (rev 0)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestPortletApplicationDeployer.java 2008-01-30 00:05:26 UTC (rev 9638)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.portlet.test;
+
+import org.jboss.portal.web.WebApp;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class TestPortletApplicationDeployer extends PortletApplicationDeployer
+{
+ /** . */
+ private Object driver;
+
+ public Object getDriver()
+ {
+ return driver;
+ }
+
+ public void setDriver(Object driver)
+ {
+ this.driver = driver;
+ }
+
+ @Override
+ protected void add(WebApp webApp)
+ {
+ // Set the driver for the web app
+ webApp.getServletContext().setAttribute("TestDriverServer", driver);
+
+ super.add(webApp);
+ }
+}
Property changes on: modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestPortletApplicationDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: modules/portlet/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-beans.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-beans.xml 2008-01-29 23:20:28 UTC (rev 9637)
+++ modules/portlet/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-beans.xml 2008-01-30 00:05:26 UTC (rev 9638)
@@ -21,9 +21,7 @@
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
- xmlns="urn:jboss:bean-deployer">
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
<bean name="TestDriverServer" class="org.jboss.unit.remote.driver.RemoteTestDriverServer"/>
@@ -40,7 +38,7 @@
<bean name="PortletApplicationRegistry"
class="org.jboss.portal.portlet.impl.container.PortletApplicationRegistryImpl"/>
- <bean name="PortletApplicationDeployer" class="org.jboss.portal.portlet.test.PortletApplicationDeployer">
+ <bean name="PortletApplicationDeployer" class="org.jboss.portal.portlet.test.TestPortletApplicationDeployer">
<property name="registry"><inject bean="PortletApplicationRegistry"/></property>
<property name="servletContainer"><inject bean="ServletContainer"/></property>
<property name="driver"><inject bean="TestDriverServer"/></property>
18 years, 3 months
JBoss Portal SVN: r9637 - in modules/portlet/trunk/portlet/src: main/java/org/jboss/portal/portlet/impl/jsr168/api and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-01-29 18:20:28 -0500 (Tue, 29 Jan 2008)
New Revision: 9637
Added:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/ForwardedContainerAttributesTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/IncludedContainerAttributesTestCase.java
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/ContentBuffer.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/DispatchedHttpServletRequest.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/DispatchedHttpServletResponse.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestDispatcherImpl.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/DispatchedContainerAttributesTestCase.java
Log:
- use an hybrid approach for request dispatching support of forward/include
- added test case for forward container request attributes
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/ContentBuffer.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/ContentBuffer.java 2008-01-29 17:12:14 UTC (rev 9636)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/ContentBuffer.java 2008-01-29 23:20:28 UTC (rev 9637)
@@ -227,10 +227,10 @@
*/
public void commit() throws IllegalStateException
{
- if (contentType == null)
- {
- throw new IllegalStateException("No content type defined");
- }
+// if (contentType == null)
+// {
+// throw new IllegalStateException("No content type defined");
+// }
commited = true;
}
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/DispatchedHttpServletRequest.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/DispatchedHttpServletRequest.java 2008-01-29 17:12:14 UTC (rev 9636)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/DispatchedHttpServletRequest.java 2008-01-29 23:20:28 UTC (rev 9637)
@@ -43,6 +43,9 @@
import java.util.Enumeration;
import java.util.Locale;
import java.util.Map;
+import java.util.HashMap;
+import java.util.Collections;
+import java.util.Iterator;
import java.io.UnsupportedEncodingException;
import java.io.IOException;
import java.io.BufferedReader;
@@ -68,11 +71,15 @@
private static final int QUERY_STRING = 3;
/** . */
+ private static final int CONTEXT_PATH = 4;
+
+ /** . */
private static final String[] INCLUDE_KEYS = {
"javax.servlet.include.request_uri",
"javax.servlet.include.servlet_path",
"javax.servlet.include.path_info",
- "javax.servlet.include.query_string"
+ "javax.servlet.include.query_string",
+ "javax.servlet.include.context_path"
};
/** . */
@@ -80,7 +87,8 @@
"javax.servlet.forward.request_uri",
"javax.servlet.forward.servlet_path",
"javax.servlet.forward.path_info",
- "javax.servlet.forward.query_string"
+ "javax.servlet.forward.query_string",
+ "javax.servlet.forward.context_path"
};
/** . */
@@ -96,9 +104,12 @@
private final Map<String, String[]> parameters;
/** . */
- private final String[] keys;
+ private final String[] containerKeys;
/** . */
+ private final Map<String, String> containerAttrs;
+
+ /** . */
private final int sessionScope = PortletSession.APPLICATION_SCOPE;
public DispatchedHttpServletRequest(
@@ -113,41 +124,57 @@
this.dispatchType = dispatchType;
this.preq = preq;
this.dreq = dreq;
- this.keys = dispatchType == DispatchType.INCLUDE ? INCLUDE_KEYS : FORWARD_KEYS;
+ this.containerKeys = dispatchType == DispatchType.INCLUDE ? INCLUDE_KEYS : FORWARD_KEYS;
//
if (path != null)
{
+ String servletPath;
+ String pathInfo;
String queryString;
-
- //
int endOfServletPath = path.indexOf('/', 1);
if (endOfServletPath == -1)
{
endOfServletPath = path.indexOf('?', 1);
if (endOfServletPath == -1)
{
+ servletPath = path;
+ pathInfo = "";
queryString = "";
}
else
{
+ servletPath = path.substring(0, endOfServletPath);
+ pathInfo = "";
queryString = path.substring(endOfServletPath + 1);
}
}
else
{
+ servletPath = path.substring(0, endOfServletPath);
int endOfPathInfo = path.indexOf('?', endOfServletPath + 1);
if (endOfPathInfo == -1)
{
+ pathInfo = path.substring(endOfServletPath);
queryString = "";
}
else
{
+ pathInfo = path.substring(endOfServletPath, endOfPathInfo);
queryString = path.substring(endOfPathInfo + 1);
}
}
+ String requestURI = preq.getContextPath() + servletPath + pathInfo;
//
+ Map<String, String> attrs = new HashMap<String, String>();
+ attrs.put(containerKeys[SERVLET_PATH], servletPath);
+ attrs.put(containerKeys[PATH_INFO], pathInfo);
+ attrs.put(containerKeys[QUERY_STRING], queryString);
+ attrs.put(containerKeys[REQUEST_URI], requestURI);
+ attrs.put(containerKeys[CONTEXT_PATH], preq.getContextPath());
+
+ //
if (queryString.length() > 0)
{
ParameterMap tmp = new ParameterMap();
@@ -155,15 +182,18 @@
tmp.append(preq.getParameterMap());
//
+ this.containerAttrs = attrs;
this.parameters = tmp;
}
else
{
+ this.containerAttrs = Collections.emptyMap();
this.parameters = preq.getParameterMap();
}
}
else
{
+ this.containerAttrs = Collections.emptyMap();
this.parameters = preq.getParameterMap();
}
}
@@ -216,7 +246,7 @@
public final String getPathInfo()
{
- return (String)getAttribute(keys[PATH_INFO]);
+ return (String)getAttribute(containerKeys[PATH_INFO]);
}
public final String getPathTranslated()
@@ -226,17 +256,17 @@
public final String getQueryString()
{
- return (String)getAttribute(keys[QUERY_STRING]);
+ return (String)getAttribute(containerKeys[QUERY_STRING]);
}
public final String getRequestURI()
{
- return (String)getAttribute(keys[REQUEST_URI]);
+ return (String)getAttribute(containerKeys[REQUEST_URI]);
}
public final String getServletPath()
{
- return (String)getAttribute(keys[SERVLET_PATH]);
+ return (String)getAttribute(containerKeys[SERVLET_PATH]);
}
// Must be equivalent to the method of the PortletRequest
@@ -258,22 +288,78 @@
public final Object getAttribute(String s)
{
+ if (containerAttrs.containsKey(s))
+ {
+ return containerAttrs.get(s);
+ }
+
+ //
return preq.getAttributes().getAttribute(s, (HttpServletRequest)getRequest());
}
public final Enumeration getAttributeNames()
{
- return Tools.toEnumeration(preq.getAttributes().getAttributeNames((HttpServletRequest)getRequest()));
+ final Iterator<String> i = preq.getAttributes().getAttributeNames((HttpServletRequest)getRequest());
+
+ //
+ return new Enumeration()
+ {
+ // The next element
+ String next;
+
+ {
+ next();
+ }
+
+ public boolean hasMoreElements()
+ {
+ return next != null;
+ }
+
+ public Object nextElement()
+ {
+ Object next = this.next;
+ next();
+ return next;
+ }
+
+ private void next()
+ {
+ next = null;
+ while (true)
+ {
+ if (i.hasNext())
+ {
+ String next = i.next();
+ if (!containerAttrs.containsKey(next))
+ {
+ this.next = next;
+ break;
+ }
+ }
+ else
+ {
+ break;
+ }
+ }
+ }
+ };
}
public final void setAttribute(String s, Object o)
{
- preq.getAttributes().setAttribute(s, o);
+ if (s != null && !containerAttrs.containsKey(s))
+ {
+ preq.getAttributes().setAttribute(s, o);
+ }
}
public final void removeAttribute(String s)
{
- preq.getAttributes().removeAttribute(s);
+ if (s != null && !containerAttrs.containsKey(s))
+ {
+ preq.getAttributes().removeAttribute(s);
+ }
}
public final Locale getLocale()
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/DispatchedHttpServletResponse.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/DispatchedHttpServletResponse.java 2008-01-29 17:12:14 UTC (rev 9636)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/DispatchedHttpServletResponse.java 2008-01-29 23:20:28 UTC (rev 9637)
@@ -189,14 +189,14 @@
{
/** . */
- private final StateAwareResponseImpl mresp;
+ private final StateAwareResponseImpl saresp;
- public StateAware(DispatchedHttpServletRequest req, StateAwareResponseImpl mresp, HttpServletResponse dresp)
+ public StateAware(DispatchedHttpServletRequest req, StateAwareResponseImpl saresp, HttpServletResponse dresp)
{
- super(req, mresp, dresp);
+ super(req, saresp, dresp);
//
- this.mresp = mresp;
+ this.saresp = saresp;
}
// Must return null
@@ -275,11 +275,11 @@
{
}
- // Must return true
+ // Must return true for include and false for forward
public boolean isCommitted()
{
- return true;
+ return req.dispatchType == DispatchType.INCLUDE;
}
}
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestDispatcherImpl.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestDispatcherImpl.java 2008-01-29 17:12:14 UTC (rev 9636)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestDispatcherImpl.java 2008-01-29 23:20:28 UTC (rev 9637)
@@ -127,6 +127,13 @@
dispatcher.include(direq, diresp);
break;
case FORWARD:
+// diresp.resetBuffer();
+//
+// //
+// dispatcher.include(direq, diresp);
+//
+// // Flush
+// diresp.flushBuffer();
dispatcher.forward(direq, diresp);
break;
}
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/DispatchedContainerAttributesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/DispatchedContainerAttributesTestCase.java 2008-01-29 17:12:14 UTC (rev 9636)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/DispatchedContainerAttributesTestCase.java 2008-01-29 23:20:28 UTC (rev 9637)
@@ -32,13 +32,10 @@
import org.jboss.portal.unit.actions.PortletResourceTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TestCase;
-import org.jboss.portal.unit.Assertion;
+import org.jboss.portal.common.util.Tools;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
-import static org.jboss.unit.api.Assert.assertNotNull;
import static org.jboss.unit.api.Assert.assertEquals;
-import static org.jboss.unit.api.Assert.assertNull;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
import javax.portlet.Portlet;
@@ -59,13 +56,13 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
+import java.util.List;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TestCase({Assertion.JSR168_127})
-public class DispatchedContainerAttributesTestCase
+public abstract class DispatchedContainerAttributesTestCase
{
private Object requestURI;
@@ -124,15 +121,24 @@
seq.bindAction(2, UTS1.SERVICE_JOIN_POINT, service);
}
- private void checkAttributes(Portlet portlet, PortletRequest request, PortletResponse response) throws PortletException, IOException
+ protected abstract void dispatch(PortletRequestDispatcher dispatcher, PortletRequest request, PortletResponse response) throws IOException, PortletException;
+
+ protected abstract String getDispatchType();
+
+ private void checkAttributes(
+ Portlet portlet,
+ PortletRequest request,
+ PortletResponse response) throws PortletException, IOException
{
//assert that servlet HAS access to specific request attributes
try
{
PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getRequestDispatcher("/universalServletA/pathinfo?foo=bar");
- dispatcher.include(request, response);
//
+ dispatch(dispatcher, request, response);
+
+ //
assertEquals("/test-jsr286-tck-dispatcher/universalServletA/pathinfo", requestURI);
assertEquals("/test-jsr286-tck-dispatcher", contextPath);
assertEquals("/universalServletA", servletPath);
@@ -153,9 +159,11 @@
try
{
PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getNamedDispatcher("UniversalServletA");
- dispatcher.include(request, response);
//
+ dispatch(dispatcher, request, response);
+
+ //
assertEquals(null, requestURI);
assertEquals(null, contextPath);
assertEquals(null, servletPath);
@@ -176,12 +184,14 @@
{
protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
{
- requestURI = request.getAttribute("javax.servlet.include.request_uri");
- contextPath = request.getAttribute("javax.servlet.include.context_path");
- servletPath = request.getAttribute("javax.servlet.include.servlet_path");
- pathInfo = request.getAttribute("javax.servlet.include.path_info");
- queryString = request.getAttribute("javax.servlet.include.query_string");
+ String dispatchType = getDispatchType();
+ requestURI = request.getAttribute("javax.servlet." + dispatchType + ".request_uri");
+ contextPath = request.getAttribute("javax.servlet." + dispatchType + ".context_path");
+ servletPath = request.getAttribute("javax.servlet." + dispatchType + ".servlet_path");
+ pathInfo = request.getAttribute("javax.servlet." + dispatchType + ".path_info");
+ queryString = request.getAttribute("javax.servlet." + dispatchType + ".query_string");
+
//
return null;
}
Added: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/ForwardedContainerAttributesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/ForwardedContainerAttributesTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/ForwardedContainerAttributesTestCase.java 2008-01-29 23:20:28 UTC (rev 9637)
@@ -0,0 +1,56 @@
+/******************************************************************************
+ * 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.test.portlet.jsr286.tck.dispatcher;
+
+import org.jboss.portal.unit.PortletTestCase;
+import org.jboss.portal.unit.Assertion;
+import org.jboss.portal.unit.annotations.TestCase;
+
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletResponse;
+import javax.portlet.PortletException;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+@TestCase
+public class ForwardedContainerAttributesTestCase extends DispatchedContainerAttributesTestCase
+{
+ public ForwardedContainerAttributesTestCase(PortletTestCase seq)
+ {
+ super(seq);
+ }
+
+ protected void dispatch(PortletRequestDispatcher dispatcher, PortletRequest request, PortletResponse response) throws IOException, PortletException
+ {
+ dispatcher.forward(request, response);
+ }
+
+ protected String getDispatchType()
+ {
+ return "forward";
+ }
+}
\ No newline at end of file
Added: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/IncludedContainerAttributesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/IncludedContainerAttributesTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/IncludedContainerAttributesTestCase.java 2008-01-29 23:20:28 UTC (rev 9637)
@@ -0,0 +1,56 @@
+/******************************************************************************
+ * 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.test.portlet.jsr286.tck.dispatcher;
+
+import org.jboss.portal.unit.PortletTestCase;
+import org.jboss.portal.unit.Assertion;
+import org.jboss.portal.unit.annotations.TestCase;
+
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletResponse;
+import javax.portlet.PortletException;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+(a)TestCase({Assertion.JSR168_127})
+public class IncludedContainerAttributesTestCase extends DispatchedContainerAttributesTestCase
+{
+ public IncludedContainerAttributesTestCase(PortletTestCase seq)
+ {
+ super(seq);
+ }
+
+ protected void dispatch(PortletRequestDispatcher dispatcher, PortletRequest request, PortletResponse response) throws IOException, PortletException
+ {
+ dispatcher.include(request, response);
+ }
+
+ protected String getDispatchType()
+ {
+ return "include";
+ }
+}
18 years, 3 months
JBoss Portal SVN: r9636 - modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-01-29 12:12:14 -0500 (Tue, 29 Jan 2008)
New Revision: 9636
Removed:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ErrorHandlingTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/GETMethodTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/IncludedRequestAttributesTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/IncludedRequestParametersTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ObtainingDispatcherTestCase.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/QueryStringInRequestDispatcherTestCase.java
Log:
- removed migrated test cases
Deleted: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ErrorHandlingTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ErrorHandlingTestCase.java 2008-01-29 17:09:15 UTC (rev 9635)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ErrorHandlingTestCase.java 2008-01-29 17:12:14 UTC (rev 9636)
@@ -1,203 +0,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. *
- ******************************************************************************/
-package org.jboss.portal.test.portlet.jsr168.tck.dispatcher;
-
-import org.jboss.portal.unit.PortletTestCase;
-import org.jboss.portal.unit.PortletTestContext;
-import org.jboss.portal.unit.base.AbstractUniversalTestPortlet;
-import org.jboss.portal.unit.actions.PortletRenderTestAction;
-import org.jboss.portal.unit.actions.ServletServiceTestAction;
-import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TestCase;
-import org.jboss.portal.unit.Assertion;
-import org.jboss.portal.unit.PortletTestContext;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-import static org.jboss.unit.api.Assert.assertNotNull;
-import static org.jboss.unit.api.Assert.fail;
-import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
-
-import javax.portlet.Portlet;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.portlet.PortletException;
-import javax.portlet.PortletRequestDispatcher;
-import javax.servlet.Servlet;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-(a)TestCase({Assertion.JSR168_142, Assertion.JSR168_143})
-public class ErrorHandlingTestCase
-{
-
- public ErrorHandlingTestCase(PortletTestCase seq)
- {
- seq.bindAction(0, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
-
- PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getNamedDispatcher("UniversalServletA");
- assertNotNull(dispatcher);
- try
- {
- dispatcher.include(request, response);
- fail();
- }
- catch (RuntimeException e)
- {
- //expected
- }
-
- return new InvokeGetResponse(response.createRenderURL().toString());
- }
- });
-
- seq.bindAction(0, UTS1.SERVICE_JOIN_POINT, new ServletServiceTestAction()
- {
- protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
- {
- return null;
- }
-
- public DriverResponse execute(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
- {
- //SPEC:142 - RuntimeException
- throw new RuntimeException();
- }
- });
-
- seq.bindAction(1, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletException
- {
- PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getNamedDispatcher("UniversalServletA");
- assertNotNull(dispatcher);
- try
- {
- dispatcher.include(request, response);
- fail();
- }
- catch (IOException e)
- {
- //expected
- }
-
- return new InvokeGetResponse(response.createRenderURL().toString());
- }
- });
-
- seq.bindAction(1, UTS1.SERVICE_JOIN_POINT, new ServletServiceTestAction()
- {
- protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
- {
- return null;
- }
-
- public DriverResponse execute(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
- {
- //SPEC:142 - checked exception of type IOException
- throw new IOException();
- }
- });
-
- seq.bindAction(2, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException
- {
-
- PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getNamedDispatcher("UniversalServletA");
- assertNotNull(dispatcher);
- try
- {
- dispatcher.include(request, response);
- fail();
- }
- catch (PortletException e)
- {
- //expected
- if (!(e.getCause() instanceof ServletException))
- {
- fail();
- }
- }
- return new InvokeGetResponse(response.createRenderURL().toString());
- }
- });
-
- seq.bindAction(2, UTS1.SERVICE_JOIN_POINT, new ServletServiceTestAction()
- {
- protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
- {
- return null;
- }
-
- public DriverResponse execute(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
- {
- //SPEC:143 - ServletException
- throw new ServletException();
- }
- });
-
- seq.bindAction(3, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException
- {
- /*PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getNamedDispatcher("UniversalServletA");
- assertNotNull(dispatcher);
- try
- {
- dispatcher.include(request,response);
- fail();
- }
- catch(Error e)
- {
- //expected
- }*/
-
- return new EndTestResponse();
- }
- });
-
- seq.bindAction(3, UTS1.SERVICE_JOIN_POINT, new ServletServiceTestAction()
- {
- protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
- {
- return null;
- }
-
- public DriverResponse execute(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
- {
- //SPEC:143 - 'other' exception
- throw new Error();
- }
- });
- }
-}
Deleted: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/GETMethodTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/GETMethodTestCase.java 2008-01-29 17:09:15 UTC (rev 9635)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/GETMethodTestCase.java 2008-01-29 17:12:14 UTC (rev 9636)
@@ -1,89 +0,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. *
- ******************************************************************************/
-package org.jboss.portal.test.portlet.jsr168.tck.dispatcher;
-
-import org.jboss.portal.unit.PortletTestCase;
-import org.jboss.portal.unit.PortletTestContext;
-import org.jboss.portal.unit.base.AbstractUniversalTestPortlet;
-import org.jboss.portal.unit.actions.PortletRenderTestAction;
-import org.jboss.portal.unit.actions.ServletServiceTestAction;
-import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TestCase;
-import org.jboss.portal.unit.Assertion;
-import org.jboss.portal.unit.PortletTestContext;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-import static org.jboss.unit.api.Assert.assertNotNull;
-import static org.jboss.unit.api.Assert.assertEquals;
-
-import javax.portlet.Portlet;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.portlet.PortletException;
-import javax.portlet.PortletRequestDispatcher;
-import javax.servlet.Servlet;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-(a)TestCase({Assertion.JSR168_126})
-public class GETMethodTestCase
-{
-
- public GETMethodTestCase(PortletTestCase seq)
- {
- seq.bindAction(0, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getNamedDispatcher("UniversalServletA");
- assertNotNull(dispatcher);
-
-
- dispatcher.include(request, response);
-
- //assert that servlet handle this as GET
- assertEquals(Boolean.TRUE, (Boolean)UTP1.local.get());
- return new EndTestResponse();
- }
- });
-
- seq.bindAction(0, UTS1.SERVICE_JOIN_POINT, new ServletServiceTestAction()
- {
- protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
- {
- if (request.getMethod().equals("GET"))
- {
- UTP1.local.set(Boolean.TRUE);
- }
- return null;
- }
- });
- }
-}
Deleted: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/IncludedRequestAttributesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/IncludedRequestAttributesTestCase.java 2008-01-29 17:09:15 UTC (rev 9635)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/IncludedRequestAttributesTestCase.java 2008-01-29 17:12:14 UTC (rev 9636)
@@ -1,113 +0,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. *
- ******************************************************************************/
-package org.jboss.portal.test.portlet.jsr168.tck.dispatcher;
-
-import org.jboss.portal.unit.PortletTestCase;
-import org.jboss.portal.unit.PortletTestContext;
-import org.jboss.portal.unit.base.AbstractUniversalTestPortlet;
-import org.jboss.portal.unit.actions.PortletRenderTestAction;
-import org.jboss.portal.unit.actions.ServletServiceTestAction;
-import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TestCase;
-import org.jboss.portal.unit.Assertion;
-import org.jboss.portal.unit.PortletTestContext;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-import static org.jboss.unit.api.Assert.assertNotNull;
-import static org.jboss.unit.api.Assert.assertEquals;
-
-import javax.portlet.Portlet;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.portlet.PortletException;
-import javax.portlet.PortletRequestDispatcher;
-import javax.servlet.Servlet;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-(a)TestCase({Assertion.JSR168_128})
-public class IncludedRequestAttributesTestCase
-{
- public IncludedRequestAttributesTestCase(PortletTestCase seq)
- {
- seq.bindAction(0, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getRequestDispatcher("/universalServletA");
- assertNotNull(dispatcher);
- dispatcher.include(request, response);
- //assert that servlet has access to correct objects via attributes
- assertAttributes((AbstractUniversalTestPortlet)portlet, request, response);
-
- dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getNamedDispatcher("UniversalServletA");
- assertNotNull(dispatcher);
- dispatcher.include(request, response);
- //assert that servlet has access to correct objects via attributes
- assertAttributes((AbstractUniversalTestPortlet)portlet, request, response);
-
- return new EndTestResponse();
-
- }
-
- public void assertAttributes(AbstractUniversalTestPortlet portlet, RenderRequest request, RenderResponse response)
- {
- try
- {
- assertNotNull(UTP1.local1.get());
- assertNotNull(UTP1.local2.get());
- assertNotNull(UTP1.local3.get());
-
- assertEquals(UTP1.local1.get(), portlet.getPortletConfig());
- assertEquals(UTP1.local2.get(), request);
- assertEquals(UTP1.local3.get(), response);
-
- }
- finally
- {
- UTP1.local1.set(null);
- UTP1.local2.set(null);
- UTP1.local3.set(null);
- }
- }
- });
-
- seq.bindAction(0, UTS1.SERVICE_JOIN_POINT, new ServletServiceTestAction()
- {
- protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
- {
- UTP1.local1.set(request.getAttribute("javax.portlet.config"));
- UTP1.local2.set(request.getAttribute("javax.portlet.request"));
- UTP1.local3.set(request.getAttribute("javax.portlet.response"));
- return null;
- }
- });
- }
-}
Deleted: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/IncludedRequestParametersTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/IncludedRequestParametersTestCase.java 2008-01-29 17:09:15 UTC (rev 9635)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/IncludedRequestParametersTestCase.java 2008-01-29 17:12:14 UTC (rev 9636)
@@ -1,127 +0,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. *
- ******************************************************************************/
-package org.jboss.portal.test.portlet.jsr168.tck.dispatcher;
-
-import org.jboss.portal.unit.PortletTestCase;
-import org.jboss.portal.unit.PortletTestContext;
-import org.jboss.portal.unit.base.AbstractUniversalTestPortlet;
-import org.jboss.portal.unit.actions.PortletRenderTestAction;
-import org.jboss.portal.unit.actions.ServletServiceTestAction;
-import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TestCase;
-import org.jboss.portal.unit.Assertion;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-import static org.jboss.unit.api.Assert.assertNotNull;
-import static org.jboss.unit.api.Assert.assertEquals;
-import static org.jboss.unit.api.Assert.assertNull;
-
-import javax.portlet.Portlet;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.portlet.PortletException;
-import javax.portlet.PortletRequestDispatcher;
-import javax.servlet.Servlet;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-(a)TestCase({Assertion.JSR168_127})
-public class IncludedRequestParametersTestCase
-{
- public IncludedRequestParametersTestCase(PortletTestCase seq)
- {
- seq.bindAction(0, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getRequestDispatcher("/universalServletA/pathinfo?foo=bar");
- assertNotNull(dispatcher);
-
- //assert that servlet HAS access to specific request attributes
- try
- {
- dispatcher.include(request, response);
- assertEquals("/test-jsr168-tck-dispatcher/universalServletA/pathinfo", UTP1.local1.get());
- assertEquals("/test-jsr168-tck-dispatcher", UTP1.local2.get());
- assertEquals("/universalServletA", UTP1.local3.get());
- assertEquals("/pathinfo", UTP1.local4.get());
- assertEquals("foo=bar", UTP1.local5.get());
- }
- finally
- {
- UTP1.local1.set(null);
- UTP1.local2.set(null);
- UTP1.local3.set(null);
- UTP1.local4.set(null);
- UTP1.local5.set(null);
- }
-
- //
- dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getNamedDispatcher("UniversalServletA");
- assertNotNull(dispatcher);
-
- // Assert that servlet has NO access to specific request attributes
- // it shouldn't access that attributes because getNamedDispatcher was used
- try
- {
- dispatcher.include(request, response);
- assertNull(UTP1.local1.get());
- assertNull(UTP1.local2.get());
- assertNull(UTP1.local3.get());
- assertNull(UTP1.local4.get());
- assertNull(UTP1.local5.get());
- }
- finally
- {
- UTP1.local1.set(null);
- UTP1.local2.set(null);
- UTP1.local3.set(null);
- UTP1.local4.set(null);
- UTP1.local5.set(null);
- }
-
- return new EndTestResponse();
- }
- });
-
- seq.bindAction(0, UTS1.SERVICE_JOIN_POINT, new ServletServiceTestAction()
- {
- protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
- {
- UTP1.local1.set(request.getAttribute("javax.servlet.include.request_uri"));
- UTP1.local2.set(request.getAttribute("javax.servlet.include.context_path"));
- UTP1.local3.set(request.getAttribute("javax.servlet.include.servlet_path"));
- UTP1.local4.set(request.getAttribute("javax.servlet.include.path_info"));
- UTP1.local5.set(request.getAttribute("javax.servlet.include.query_string"));
- return null;
- }
- });
- }
-}
Deleted: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ObtainingDispatcherTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ObtainingDispatcherTestCase.java 2008-01-29 17:09:15 UTC (rev 9635)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ObtainingDispatcherTestCase.java 2008-01-29 17:12:14 UTC (rev 9636)
@@ -1,96 +0,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. *
- ******************************************************************************/
-package org.jboss.portal.test.portlet.jsr168.tck.dispatcher;
-
-import org.jboss.portal.unit.PortletTestCase;
-import org.jboss.portal.unit.PortletTestContext;
-import org.jboss.portal.unit.actions.PortletRenderTestAction;
-import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.unit.annotations.TestCase;
-import org.jboss.portal.unit.Assertion;
-import org.jboss.portal.unit.PortletTestCase;
-import org.jboss.portal.unit.PortletTestContext;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-import static org.jboss.unit.api.Assert.assertNotNull;
-import static org.jboss.unit.api.Assert.assertNull;
-
-import javax.portlet.Portlet;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.portlet.PortletRequestDispatcher;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-(a)TestCase({Assertion.JSR168_121, Assertion.JSR168_122})
-public class ObtainingDispatcherTestCase
-{
- public ObtainingDispatcherTestCase(PortletTestCase seq)
- {
- seq.bindAction(0, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- UTP1 p = (UTP1)portlet;
- //correct
- PortletRequestDispatcher dispatcher = p.getPortletContext().getNamedDispatcher("UniversalServletA");
- assertNotNull(dispatcher);
-
- //incorrect
- dispatcher = p.getPortletContext().getNamedDispatcher("FAKE_NAME_SERVLET");
- assertNull(dispatcher);
-
- //incorrect
- dispatcher = p.getPortletContext().getNamedDispatcher("/");
- assertNull(dispatcher);
-
- //incorrect
- dispatcher = p.getPortletContext().getNamedDispatcher("/universalServletA");
- assertNull(dispatcher);
-
- //incorrect
- dispatcher = p.getPortletContext().getRequestDispatcher("UniversalServletA");
- assertNull(dispatcher);
-
- //incorrect
- dispatcher = p.getPortletContext().getRequestDispatcher("universalServletA");
- assertNull(dispatcher);
-
- //incorrect
- //dispatcher = getPortletContext().getRequestDispatcher("/UniversalServletA");
- //assertNull(dispatcher);
-
- //incorrect
- //dispatcher = getPortletContext().getRequestDispatcher("/");
- //assertNull(dispatcher);
-
- //correct
- dispatcher = p.getPortletContext().getRequestDispatcher("/universalServletA");
- assertNotNull(dispatcher);
- return new EndTestResponse();
- }
- });
- }
-}
Deleted: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/QueryStringInRequestDispatcherTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/QueryStringInRequestDispatcherTestCase.java 2008-01-29 17:09:15 UTC (rev 9635)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/QueryStringInRequestDispatcherTestCase.java 2008-01-29 17:12:14 UTC (rev 9636)
@@ -1,111 +0,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. *
- ******************************************************************************/
-package org.jboss.portal.test.portlet.jsr168.tck.dispatcher;
-
-import org.jboss.portal.unit.PortletTestCase;
-import org.jboss.portal.unit.PortletTestContext;
-import org.jboss.portal.unit.base.AbstractUniversalTestPortlet;
-import org.jboss.portal.unit.actions.PortletRenderTestAction;
-import org.jboss.portal.unit.actions.PortletActionTestAction;
-import org.jboss.portal.unit.actions.ServletServiceTestAction;
-import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TestCase;
-import org.jboss.portal.unit.Assertion;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
-import static org.jboss.unit.api.Assert.assertNotNull;
-import static org.jboss.unit.api.Assert.assertEquals;
-import static org.jboss.unit.api.Assert.assertNull;
-
-import javax.portlet.Portlet;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import javax.portlet.PortletException;
-import javax.portlet.PortletRequestDispatcher;
-import javax.servlet.Servlet;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-(a)TestCase({Assertion.JSR168_123})
-public class QueryStringInRequestDispatcherTestCase
-{
- public QueryStringInRequestDispatcherTestCase(PortletTestCase seq)
- {
- seq.bindAction(0, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new InvokeGetResponse(response.createActionURL().toString());
- }
- });
-
- seq.bindAction(1, UTP1.ACTION_JOIN_POINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
- {
- //set some render params to test them in dispatcher include (precedense)
- response.setRenderParameter("key1", "differentValue");
- response.setRenderParameter("key3", "k3value1");
- }
- });
-
- seq.bindAction(1, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- String path = "/universalServletA";
- path += "?key1=k1value1&key2=k2value1";
- PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getRequestDispatcher(path);
- assertNotNull(dispatcher);
-
- dispatcher.include(request, response);
-
- //assert that params from query string doesn't last longer then in include call
- assertEquals("differentValue", request.getParameter("key1"));
- assertNull(request.getParameter("key2"));
- return new EndTestResponse();
- }
- });
-
- seq.bindAction(1, UTS1.SERVICE_JOIN_POINT, new ServletServiceTestAction()
- {
- protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
- {
- assertEquals("k1value1", request.getParameter("key1"));
- assertEquals("k2value1", request.getParameter("key2"));
- assertEquals("k3value1", request.getParameter("key3"));
- return null;
- }
- });
- }
-}
18 years, 3 months
JBoss Portal SVN: r9635 - modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-01-29 12:09:15 -0500 (Tue, 29 Jan 2008)
New Revision: 9635
Added:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/DispatchedContainerAttributesTestCase.java
Log:
- migrated special container attributes test case
Added: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/DispatchedContainerAttributesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/DispatchedContainerAttributesTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/DispatchedContainerAttributesTestCase.java 2008-01-29 17:09:15 UTC (rev 9635)
@@ -0,0 +1,189 @@
+/******************************************************************************
+ * 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.test.portlet.jsr286.tck.dispatcher;
+
+import org.jboss.portal.unit.PortletTestCase;
+import org.jboss.portal.unit.PortletTestContext;
+import org.jboss.portal.unit.base.AbstractUniversalTestPortlet;
+import org.jboss.portal.unit.actions.PortletRenderTestAction;
+import org.jboss.portal.unit.actions.ServletServiceTestAction;
+import org.jboss.portal.unit.actions.PortletActionTestAction;
+import org.jboss.portal.unit.actions.PortletEventTestAction;
+import org.jboss.portal.unit.actions.PortletResourceTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.test.portlet.framework.UTS1;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNotNull;
+import static org.jboss.unit.api.Assert.assertEquals;
+import static org.jboss.unit.api.Assert.assertNull;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletResponse;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.EventRequest;
+import javax.portlet.EventResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+(a)TestCase({Assertion.JSR168_127})
+public class DispatchedContainerAttributesTestCase
+{
+
+ private Object requestURI;
+ private Object contextPath;
+ private Object servletPath;
+ private Object pathInfo;
+ private Object queryString;
+
+ public DispatchedContainerAttributesTestCase(PortletTestCase seq)
+ {
+ seq.bindAction(0, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ return new InvokeGetResponse(response.createActionURL().toString());
+ }
+ });
+ seq.bindAction(1, UTP1.ACTION_JOIN_POINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ checkAttributes(portlet, request, response);
+
+ //
+ response.setEvent("Event", null);
+ }
+ });
+ seq.bindAction(1, UTP1.EVENT_JOIN_POINT, new PortletEventTestAction()
+ {
+ protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ checkAttributes(portlet, request, response);
+ }
+ });
+ seq.bindAction(1, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ checkAttributes(portlet, request, response);
+
+ //
+ return new InvokeGetResponse(response.createResourceURL().toString());
+ }
+ });
+ seq.bindAction(1, UTS1.SERVICE_JOIN_POINT, service);
+ seq.bindAction(2, UTP1.RESOURCE_JOIN_POINT, new PortletResourceTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, ResourceRequest request, ResourceResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ checkAttributes(portlet, request, response);
+
+ //
+ return new EndTestResponse();
+ }
+ });
+ seq.bindAction(2, UTS1.SERVICE_JOIN_POINT, service);
+ }
+
+ private void checkAttributes(Portlet portlet, PortletRequest request, PortletResponse response) throws PortletException, IOException
+ {
+ //assert that servlet HAS access to specific request attributes
+ try
+ {
+ PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getRequestDispatcher("/universalServletA/pathinfo?foo=bar");
+ dispatcher.include(request, response);
+
+ //
+ assertEquals("/test-jsr286-tck-dispatcher/universalServletA/pathinfo", requestURI);
+ assertEquals("/test-jsr286-tck-dispatcher", contextPath);
+ assertEquals("/universalServletA", servletPath);
+ assertEquals("/pathinfo", pathInfo);
+ assertEquals("foo=bar", queryString);
+ }
+ finally
+ {
+ requestURI = null;
+ contextPath = null;
+ servletPath = null;
+ pathInfo = null;
+ queryString = null;
+ }
+
+ // Assert that servlet has NO access to specific request attributes
+ // it shouldn't access that attributes because getNamedDispatcher was used
+ try
+ {
+ PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getNamedDispatcher("UniversalServletA");
+ dispatcher.include(request, response);
+
+ //
+ assertEquals(null, requestURI);
+ assertEquals(null, contextPath);
+ assertEquals(null, servletPath);
+ assertEquals(null, pathInfo);
+ assertEquals(null, queryString);
+ }
+ finally
+ {
+ requestURI = null;
+ contextPath = null;
+ servletPath = null;
+ pathInfo = null;
+ queryString = null;
+ }
+ }
+
+ ServletServiceTestAction service = new ServletServiceTestAction()
+ {
+ protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
+ {
+ requestURI = request.getAttribute("javax.servlet.include.request_uri");
+ contextPath = request.getAttribute("javax.servlet.include.context_path");
+ servletPath = request.getAttribute("javax.servlet.include.servlet_path");
+ pathInfo = request.getAttribute("javax.servlet.include.path_info");
+ queryString = request.getAttribute("javax.servlet.include.query_string");
+
+ //
+ return null;
+ }
+ };
+}
\ No newline at end of file
18 years, 3 months
JBoss Portal SVN: r9634 - modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-01-29 11:26:55 -0500 (Tue, 29 Jan 2008)
New Revision: 9634
Added:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/MethodTestCase.java
Log:
- migrated HTTP method test case
Added: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/MethodTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/MethodTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/MethodTestCase.java 2008-01-29 16:26:55 UTC (rev 9634)
@@ -0,0 +1,201 @@
+/******************************************************************************
+ * 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.test.portlet.jsr286.tck.dispatcher;
+
+import org.jboss.portal.unit.PortletTestCase;
+import org.jboss.portal.unit.PortletTestContext;
+import org.jboss.portal.unit.base.AbstractUniversalTestPortlet;
+import org.jboss.portal.unit.actions.PortletRenderTestAction;
+import org.jboss.portal.unit.actions.ServletServiceTestAction;
+import org.jboss.portal.unit.actions.PortletActionTestAction;
+import org.jboss.portal.unit.actions.PortletEventTestAction;
+import org.jboss.portal.unit.actions.PortletResourceTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.test.portlet.framework.UTS1;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
+import org.jboss.portal.unit.PortletTestContext;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNotNull;
+import static org.jboss.unit.api.Assert.assertEquals;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokePostResponse;
+import org.jboss.unit.remote.http.HttpRequest;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.EventRequest;
+import javax.portlet.EventResponse;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+(a)TestCase({Assertion.JSR168_126})
+public class MethodTestCase
+{
+
+ /** . */
+ private String method;
+
+ public MethodTestCase(PortletTestCase seq)
+ {
+ seq.bindAction(0, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ return new InvokeGetResponse(response.createActionURL().toString());
+ }
+ });
+
+ //
+ seq.bindAction(1, UTP1.ACTION_JOIN_POINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ check(portlet, request, response, "GET");
+
+ //
+ response.setEvent("Event", null);
+ }
+ });
+ seq.bindAction(1, UTP1.EVENT_JOIN_POINT, new PortletEventTestAction()
+ {
+ protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ check(portlet, request, response, "GET");
+ }
+ });
+ seq.bindAction(1, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ check(portlet, request, response, "GET");
+
+ //
+ return new InvokeGetResponse(response.createResourceURL().toString());
+ }
+ });
+ seq.bindAction(1, UTS1.SERVICE_JOIN_POINT, service);
+ seq.bindAction(2, UTP1.RESOURCE_JOIN_POINT, new PortletResourceTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, ResourceRequest request, ResourceResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ check(portlet, request, response, "GET");
+
+ //
+ InvokePostResponse post = new InvokePostResponse(response.createActionURL().toString());
+ post.setContentType(InvokePostResponse.APPLICATION_X_WWW_FORM_URLENCODED);
+ post.setBody(new HttpRequest.Form());
+ return post;
+ }
+ });
+ seq.bindAction(2, UTS1.SERVICE_JOIN_POINT, service);
+
+ //
+ seq.bindAction(3, UTP1.ACTION_JOIN_POINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ check(portlet, request, response, "POST");
+
+ //
+ response.setEvent("Event", null);
+ }
+ });
+ seq.bindAction(3, UTP1.EVENT_JOIN_POINT, new PortletEventTestAction()
+ {
+ protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ check(portlet, request, response, "POST");
+ }
+ });
+ seq.bindAction(3, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ check(portlet, request, response, "GET");
+
+ //
+ InvokePostResponse post = new InvokePostResponse(response.createResourceURL().toString());
+ post.setContentType(InvokePostResponse.APPLICATION_X_WWW_FORM_URLENCODED);
+ post.setBody(new HttpRequest.Form());
+ return post;
+ }
+ });
+ seq.bindAction(3, UTS1.SERVICE_JOIN_POINT, service);
+ seq.bindAction(4, UTP1.RESOURCE_JOIN_POINT, new PortletResourceTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, ResourceRequest request, ResourceResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ check(portlet, request, response, "POST");
+
+ //
+ return new EndTestResponse();
+ }
+ });
+ seq.bindAction(4, UTS1.SERVICE_JOIN_POINT, service);
+ }
+
+ private void check(
+ Portlet portlet,
+ PortletRequest request,
+ PortletResponse response,
+ String expectedMethod) throws PortletException, IOException
+ {
+ method = null;
+ PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getNamedDispatcher("UniversalServletA");
+ dispatcher.include(request, response);
+ assertEquals(expectedMethod, method);
+
+ //
+ method = null;
+ dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getRequestDispatcher("/universalServletA");
+ dispatcher.include(request, response);
+ assertEquals(expectedMethod, method);
+ }
+
+ private final ServletServiceTestAction service = new ServletServiceTestAction()
+ {
+ protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
+ {
+ method = request.getMethod();
+ return null;
+ }
+ };
+}
\ No newline at end of file
18 years, 3 months
JBoss Portal SVN: r9633 - modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-01-29 10:51:20 -0500 (Tue, 29 Jan 2008)
New Revision: 9633
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/Assertion.java
Log:
more updated Assertion
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/Assertion.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/Assertion.java 2008-01-29 15:47:35 UTC (rev 9632)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/Assertion.java 2008-01-29 15:51:20 UTC (rev 9633)
@@ -493,17 +493,28 @@
// PLT,7 Portlet URLs
JSR286_35(new TCK(35), "", ""),
-
- //..
-
+ JSR286_36(new TCK(36), "", ""),
+ JSR286_37(new TCK(37), "", ""),
+ JSR286_38(new TCK(38), "", ""),
+ JSR286_39(new TCK(39), "", ""),
+ JSR286_40(new TCK(40), "", ""),
+ JSR286_41(new TCK(41), "", ""),
+ JSR286_42(new TCK(42), "", ""),
+ JSR286_43(new TCK(43), "", ""),
+ JSR286_44(new TCK(45), "", ""),
+ JSR286_45(new TCK(44), "", ""),
+ JSR286_46(new TCK(46), "", ""),
+ JSR286_47(new TCK(47), "", ""),
+ JSR286_48(new TCK(48), "", ""),
+ JSR286_49(new TCK(49), "", ""),
+ JSR286_50(new TCK(50), "", ""),
JSR286_51(new TCK(51), "", ""),
// PLT.8 Portlet Modes
JSR286_52(new TCK(52), "", ""),
-
- //..
-
+ JSR286_53(new TCK(53), "", ""),
+ JSR286_54(new TCK(54), "", ""),
JSR286_55(new TCK(55), "", ""),
// PLT.9 Window States
@@ -515,9 +526,12 @@
// PLT.10 Portlet Context
JSR286_59(new TCK(59), "", ""),
-
- //..
-
+ JSR286_60(new TCK(60), "", ""),
+ JSR286_61(new TCK(61), "", ""),
+ JSR286_62(new TCK(62), "", ""),
+ JSR286_63(new TCK(63), "", ""),
+ JSR286_64(new TCK(64), "", ""),
+ JSR286_65(new TCK(64), "", ""),
JSR286_66(new TCK(66), "", ""),
// PLT.11 Portlet Requests
@@ -607,23 +621,45 @@
// PLT.12 Portlet Responses
JSR286_100(new TCK(100), "", ""),
-
- //..
-
+ JSR286_101(new TCK(101), "", ""),
+ JSR286_102(new TCK(102), "", ""),
JSR286_103(new TCK(103), "Using the setRenderParameter and setRenderParameters methods portlets may set " +
"render parameters. A call to any of the setRenderParameter methods must replace any " +
"parameter with the same name previously set."),
- //..
+ JSR286_104(new TCK(104), "", ""),
+ JSR286_105(new TCK(105), "", ""),
+ JSR286_106(new TCK(106), "", ""),
+ JSR286_107(new TCK(107), "", ""),
+ JSR286_108(new TCK(108), "", ""),
+ JSR286_109(new TCK(109), "", ""),
+ JSR286_110(new TCK(110), "", ""),
+ JSR286_111(new TCK(111), "", ""),
+ JSR286_112(new TCK(112), "", ""),
+ JSR286_113(new TCK(113), "", ""),
+ JSR286_114(new TCK(114), "", ""),
+ JSR286_115(new TCK(115), "", ""),
+ JSR286_116(new TCK(116), "", ""),
+ JSR286_117(new TCK(117), "", ""),
+ JSR286_118(new TCK(118), "", ""),
+ JSR286_119(new TCK(119), "", ""),
+ JSR286_120(new TCK(120), "", ""),
JSR286_121(new TCK(121), "", ""),
+
// PLT.13 Resource Serving
JSR286_122(new TCK(122), "", ""),
-
- //..
-
+ JSR286_123(new TCK(123), "", ""),
+ JSR286_124(new TCK(124), "", ""),
+ JSR286_125(new TCK(125), "", ""),
+ JSR286_126(new TCK(126), "", ""),
+ JSR286_127(new TCK(127), "", ""),
+ JSR286_128(new TCK(128), "", ""),
+ JSR286_129(new TCK(129), "", ""),
+ JSR286_130(new TCK(130), "", ""),
+ JSR286_131(new TCK(131), "", ""),
JSR286_132(new TCK(132), "", ""),
@@ -668,17 +704,37 @@
JSR286_148(new TCK(148), "", ""),
- //..
-
+ JSR286_149(new TCK(149), "", ""),
+ JSR286_150(new TCK(150), "", ""),
+ JSR286_151(new TCK(151), "", ""),
+ JSR286_152(new TCK(152), "", ""),
+ JSR286_153(new TCK(153), "", ""),
+ JSR286_154(new TCK(154), "", ""),
+ JSR286_155(new TCK(155), "", ""),
+ JSR286_156(new TCK(156), "", ""),
+ JSR286_157(new TCK(157), "", ""),
+ JSR286_158(new TCK(158), "", ""),
+ JSR286_159(new TCK(159), "", ""),
+ JSR286_160(new TCK(160), "", ""),
JSR286_161(new TCK(161), "", ""),
// PLT.18 Sessions
JSR286_162(new TCK(162), "", ""),
-
- //..
-
+ JSR286_163(new TCK(163), "", ""),
+ JSR286_164(new TCK(164), "", ""),
+ JSR286_165(new TCK(165), "", ""),
+ JSR286_166(new TCK(166), "", ""),
+ JSR286_167(new TCK(167), "", ""),
+ JSR286_168(new TCK(168), "", ""),
+ JSR286_169(new TCK(169), "", ""),
+ JSR286_170(new TCK(170), "", ""),
+ JSR286_171(new TCK(171), "", ""),
+ JSR286_172(new TCK(172), "", ""),
+ JSR286_173(new TCK(173), "", ""),
+ JSR286_174(new TCK(174), "", ""),
+ JSR286_175(new TCK(175), "", ""),
JSR286_176(new TCK(176), "", ""),
@@ -693,54 +749,129 @@
JSR286_182(new TCK(182), "", ""),
JSR286_183(new TCK(183), "", ""),
JSR286_184(new TCK(184), "", ""),
- JSR286_185(new TCK(185), "", ""),
- JSR286_186(new TCK(186), "", ""),
- JSR286_187(new TCK(187), "", ""),
- JSR286_188(new TCK(188), "", ""),
- JSR286_189(new TCK(189), "", ""),
- JSR286_190(new TCK(190), "", ""),
- JSR286_191(new TCK(191), "", ""),
- JSR286_192(new TCK(192), "", ""),
- JSR286_193(new TCK(193), "", ""),
- JSR286_194(new TCK(194), "", ""),
- JSR286_195(new TCK(195), "", ""),
- JSR286_196(new TCK(196), "", ""),
- JSR286_197(new TCK(197), "", ""),
- JSR286_198(new TCK(198), "", ""),
- JSR286_199(new TCK(199), "", ""),
- JSR286_200(new TCK(200), "", ""),
- JSR286_201(new TCK(201), "", ""),
- JSR286_202(new TCK(202), "", ""),
- JSR286_203(new TCK(203), "", ""),
- JSR286_204(new TCK(204), "", ""),
- JSR286_205(new TCK(205), "", ""),
- JSR286_206(new TCK(206), "", ""),
- JSR286_207(new TCK(207), "", ""),
- JSR286_208(new TCK(208), "", ""),
- JSR286_209(new TCK(209), "", ""),
- JSR286_210(new TCK(210), "", ""),
- JSR286_211(new TCK(211), "", ""),
- JSR286_212(new TCK(212), "", ""),
- JSR286_213(new TCK(213), "", ""),
- JSR286_214(new TCK(214), "", ""),
- JSR286_215(new TCK(215), "", ""),
- JSR286_216(new TCK(216), "", ""),
- JSR286_217(new TCK(217), "", ""),
- JSR286_218(new TCK(218), "", ""),
- JSR286_219(new TCK(219), "", ""),
- JSR286_220(new TCK(220), "", ""),
- JSR286_221(new TCK(221), "", ""),
- JSR286_222(new TCK(222), "", ""),
- JSR286_223(new TCK(223), "", ""),
- JSR286_224(new TCK(224), "", ""),
- JSR286_225(new TCK(225), "", ""),
- JSR286_226(new TCK(226), "", ""),
- JSR286_227(new TCK(227), "", ""),
- JSR286_228(new TCK(228), "", ""),
- JSR286_229(new TCK(229), "", ""),
- JSR286_230(new TCK(230), "", ""),
- JSR286_231(new TCK(231), "", ""),
- JSR286_232(new TCK(232), "", ""),
+
+ // PLT.19.3.3 Request and Response Objects for Included Servlets/JSPs from within the Action and Event processing Methods
+ JSR286_185(new TCK(185), "PLT.19.3.3", "The following methods of the HttpServletRequest must return null: " +
+ "getRemoteAddr, getRemoteHost, getRealPath, getLocalAddress, getLocalName, and getRequestURL."),
+ JSR286_186(new TCK(186), "PLT.19.3.3", "The following methods of the HttpServletRequest must return ‘0’: " +
+ "getRemotePort and getLocalPort."),
+ JSR286_187(new TCK(187), "PLT.19.3.3", "The following methods of the HttpServletRequest must return the path " +
+ "and query string information used to obtain the PortletRequestDispatcher object: getPathInfo, " +
+ "getPathTranslated, getQueryString, getRequestURI and getServletPath."),
+ JSR286_188(new TCK(188), "PLT.19.3.3", "The following methods of the HttpServletRequest must be equivalent " +
+ "to the methods of the PortletRequest of similar name: getScheme, getServerName, getServerPort, getAttribute, " +
+ "getAttributeNames, setAttribute, removeAttribute, getLocale, getLocales, isSecure, getAuthType,\n" +
+ "getContextPath, getRemoteUser, getUserPrincipal, getRequestedSessionId, isRequestedSessionIdValid, getCookies."),
+ JSR286_189(new TCK(189), "PLT.19.3.3", "The following methods of the HttpServletRequest must be equivalent to " +
+ "the methods of the PortletRequest of similar name with the provision defined in PLT.19.1.1 Query Strings " +
+ "in Request Dispatcher Paths Section: getParameter, getParameterNames, getParameterValues and getParameterMap."),
+ JSR286_190(new TCK(190), "PLT.19.3.3", "In case of an include from processAction, the following methods of the " +
+ "HttpServletRequest must be based on the corresponding methods of the\n" +
+ "ActionRequest: getCharacterEncoding, setCharacterEncoding, getContentType, getInputStream, getContentLength, " +
+ "getMethod and getReader."),
+ JSR286_191(new TCK(191), "PLT.19.3.3", "In case of an include from processEvent, the following methods of the " +
+ "HttpServletRequest must do no operations and/or return null: getCharacterEncoding, setCharacterEncoding, " +
+ "getContentType, getInputStream and getReader"),
+ JSR286_192(new TCK(192), "PLT.19.3.3", "The getContentLength method of the HttpServletRequest must return 0."),
+ JSR286_193(new TCK(193), "PLT.19.3.3", "The getMethod method of the HTTPServletRequest must be based on the " +
+ "corresponding method of the EventRequest, which must provide the name of the HTTP method with which the " +
+ "original action request was made."),
+ JSR286_194(new TCK(194), "PLT.19.3.3", "The following methods of the HttpServletRequest must be based on the " +
+ "properties provided by the getProperties method of the PortletRequest interface: getHeader, getHeaders, " +
+ "getHeaderNames, getDateHeader and getIntHeader."),
+ JSR286_195(new TCK(195), "PLT.19.3.3", "The following methods of the HttpServletRequest must provide the " +
+ "functionality defined by the Servlet Specification: getRequestDispatcher, isUserInRole, getSession, " +
+ "isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL and isRequestedSessionIdFromUrl."),
+ JSR286_196(new TCK(196), "PLT.19.3.3", "The getProtocol method of the HttpServletRequest must always return " +
+ "‘HTTP/1.1’.The getProtocol method of the HttpServletRequest must always return ‘HTTP/1.1’."),
+ JSR286_197(new TCK(197), "PLT.19.3.3", "The following methods of the HttpServletResponse must return null: " +
+ "encodeRedirectURL, encodeRedirectUrl, getCharacterEncoding, getContentType, getLocale, resetBuffer, reset."),
+ JSR286_198(new TCK(198), "PLT.19.3.3", "The following method of the HttpServletResponse must return 0: getBufferSize."),
+ JSR286_199(new TCK(199), "PLT.19.3.3", "The following methods of the HttpServletResponse must return an " +
+ "outputstream / writer that ignores any output written to it: getOutputStream and getWriter."),
+ JSR286_200(new TCK(200), "PLT.19.3.3", "The following methods of the HttpServletResponse must be equivalent " +
+ "to the methods of the ActionResponse/EventResponse of similar name: encodeURL and encodeUrl."),
+ JSR286_201(new TCK(201), "PLT.19.3.3", "The following methods of the HttpServletResponse must perform no " +
+ "operations: setContentType, setCharacterEncoding, setContentLength, setLocale, addCookie, sendError, " +
+ "sendRedirect, setDateHeader, addDateHeader, setHeader, addHeader, setIntHeader, addIntHeader, setStatus,\n" +
+ "setBufferSize and flushBuffer."),
+ JSR286_202(new TCK(202), "PLT.19.3.3", "The containsHeader method of the HttpServletResponse must return false."),
+ JSR286_203(new TCK(203), "PLT.19.3.3", "The isCommitted method of the HttpServletResponse must return true."),
+
+ // PLT.19.3.4 Request and Response Objects for Included Servlets/JSPs from within the Render Method
+ JSR286_204(new TCK(204), "PLT.19.3.4", "The following methods of the HttpServletRequest must return null: " +
+ "getRemoteAddr, getRemoteHost, getLocalAddress, getLocalName, getRealPath, and getRequestURL."),
+ JSR286_205(new TCK(205), "PLT.19.3.4", "The following methods of the HttpServletRequest must return ‘0’: " +
+ "getRemotePort and getLocalPort."),
+ JSR286_206(new TCK(206), "PLT.19.3.4", "The following methods of the HttpServletRequest must return the " +
+ "path and query string information used to obtain the PortletRequestDispatcher object: getPathInfo, " +
+ "getPathTranslated, getQueryString, getRequestURI and getServletPath."),
+ JSR286_207(new TCK(207), "PLT.19.3.4", "The following methods of the HttpServletRequest must be equivalent " +
+ "to the methods of the PortletRequest of similar name: getScheme, getServerName, getServerPort, getAttribute, " +
+ "getAttributeNames, setAttribute, removeAttribute, getLocale, getLocales, isSecure, getAuthType, getContextPath, " +
+ "getRemoteUser, getUserPrincipal, getRequestedSessionId, isRequestedSessionIdValid, getCookies."),
+ JSR286_208(new TCK(208), "PLT.19.3.4", "The following methods of the HttpServletRequest must be equivalent to " +
+ "the methods of the PortletRequest of similar name with the provision defined in PLT.18.1.1 Query Strings in " +
+ "Request Dispatcher Paths Section: getParameter, getParameterNames, getParameterValues and getParameterMap."),
+ JSR286_209(new TCK(209), "PLT.19.3.4", "The following methods of the HttpServletRequest must do no operations " +
+ "and return null: getCharacterEncoding, setCharacterEncoding, getContentType, getInputStream and getReader."),
+ JSR286_210(new TCK(210), "PLT.19.3.4", "The getContentLength method of the HttpServletRequest must return 0"),
+ JSR286_211(new TCK(211), "PLT.19.3.4", "The following methods of the HttpServletRequest must be based on the " +
+ "properties provided by the getProperties method of the PortletRequest interface: getHeader, getHeaders, " +
+ "getHeaderNames, getDateHeader and getIntHeader."),
+ JSR286_212(new TCK(212), "PLT.19.3.4", "The following methods of the HttpServletRequest must provide the " +
+ "functionality defined by the Servlet Specification: getRequestDispatcher, isUserInRole, getSession, " +
+ "isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL and isRequestedSessionIdFromUrl."),
+ JSR286_213(new TCK(213), "PLT.19.3.4", "The getMethod method of the HttpServletRequest must always return ‘GET’."),
+ JSR286_214(new TCK(214), "PLT.19.3.4", "The getProtocol method of the HttpServletRequest must always return ‘HTTP/1.1’."),
+ JSR286_215(new TCK(215), "PLT.19.3.4", "The following methods of the HttpServletResponse must return null: " +
+ "encodeRedirectURL and encodeRedirectUrl."),
+ JSR286_216(new TCK(216), "PLT.19.3.4", "The following methods of the HttpServletResponse must be equivalent " +
+ "to the methods of the RenderResponse of similar name: getCharacterEncoding, setBufferSize, flushBuffer, " +
+ "resetBuffer, reset, getBufferSize, isCommitted, getOutputStream, getWriter, encodeURL and encodeUrl."),
+ JSR286_217(new TCK(217), "PLT.19.3.4", "The following methods of the HttpServletResponse must perform no " +
+ "operations: setContentType, setContentLength, setLocale, addCookie, sendError, sendRedirect, setDateHeader, " +
+ "addDateHeader, setHeader, addHeader, setIntHeader, addIntHeader and setStatus."),
+ JSR286_218(new TCK(218), "PLT.19.3.4", "The containsHeader method of the HttpServletResponse must return false."),
+ JSR286_219(new TCK(219), "PLT.19.3.4", "The getLocale method of the HttpServletResponse must be based on the " +
+ "getLocale method of the RenderResponse."),
+
+ // PLT.19.3.5 Request and Response Objects for Included Servlets/JSPs from within the ServeResource Method
+ JSR286_220(new TCK(220), "PLT.19.3.5", "The following methods of the HttpServletRequest must return null: " +
+ "getRemoteAddr, getRemoteHost, getLocalAddress, getLocalName, getRealPath, and getRequestURL."),
+ JSR286_221(new TCK(221), "PLT.19.3.5", "The following methods of the HttpServletRequest must return ‘0’:" +
+ " getRemotePort and getLocalPort."),
+ JSR286_222(new TCK(222), "PLT.19.3.5", "The following methods of the HttpServletRequest must return the " +
+ "path and query string information used to obtain the PortletRequestDispatcher object: getPathInfo, " +
+ "getPathTranslated, getQueryString, getRequestURI and getServletPath."),
+ JSR286_223(new TCK(223), "PLT.19.3.5", "The following methods of the HttpServletRequest must be equivalent " +
+ "to the methods of the PortletRequest of similar name: getScheme, getServerName, getServerPort, getAttribute, " +
+ "getAttributeNames, setAttribute, removeAttribute, getLocale, getLocales, isSecure, getAuthType,\n" +
+ "getContextPath, getRemoteUser, getUserPrincipal, getRequestedSessionId, isRequestedSessionIdValid, getCookies."),
+ JSR286_224(new TCK(224), "PLT.19.3.5", "The following methods of the HttpServletRequest must be equivalent to " +
+ "the methods of the ResourceRequest of similar name: getCharacterEncoding, setCharacterEncoding, getContentType, " +
+ "getMethod, getContentLength and getReader."),
+ JSR286_225(new TCK(225), "PLT.19.3.5", "The following methods of the HttpServletRequest must be equivalent to " +
+ "the methods of the PortletRequest of similar name with the provision defined in PLT.18.1.1 Query Strings in " +
+ "Request Dispatcher Paths Section: getParameter, getParameterNames, getParameterValues and getParameterMap."),
+ JSR286_226(new TCK(226), "PLT.19.3.5", "The following methods of the HttpServletRequest must be based on the " +
+ "properties provided by the getProperties method of the PortletRequest interface: getHeader, getHeaders, " +
+ "getHeaderNames, getDateHeader and getIntHeader."),
+ JSR286_227(new TCK(227), "PLT.19.3.5", "The following methods of the HttpServletRequest must provide the " +
+ "functionality defined by the Servlet Specification: getRequestDispatcher, isUserInRole, getSession, " +
+ "isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL and isRequestedSessionIdFromUrl."),
+ JSR286_228(new TCK(228), "PLT.19.3.5", "The getProtocol method of the HttpServletRequest must always return ‘HTTP/1.1’."),
+ JSR286_229(new TCK(229), "PLT.19.3.5", "The following methods of the HttpServletResponse must return null: " +
+ "encodeRedirectURL and encodeRedirectUrl."),
+ JSR286_230(new TCK(230), "PLT.19.3.5", "The following methods of the HttpServletResponse must be equivalent " +
+ "to the methods of the ResourceResponse of similar name: getCharacterEncoding, setBufferSize, flushBuffer, " +
+ "resetBuffer, reset, getBufferSize, isCommitted, getOutputStream, getWriter, getLocale, encodeURL and encodeUrl."),
+ JSR286_231(new TCK(231), "PLT.19.3.5", "The following methods of the HttpServletResponse must perform no " +
+ "operations: sendError, sendRedirect, addCookie, setDateHeader, addDateHeader, setHeader, addHeader, " +
+ "setIntHeader, addIntHeader, setContentLength, setCharacterEncoding, setContentType, setLocale and setStatus."),
+ JSR286_232(new TCK(232), "PLT.19.3.5", "The containsHeader method of the HttpServletResponse must return false."),
+
+ //
JSR286_233(new TCK(233), "", ""),
JSR286_234(new TCK(234), "", ""),
JSR286_235(new TCK(235), "", ""),
@@ -751,66 +882,145 @@
JSR286_240(new TCK(240), "", ""),
JSR286_241(new TCK(241), "", ""),
JSR286_242(new TCK(242), "", ""),
- JSR286_243(new TCK(243), "", ""),
- JSR286_244(new TCK(244), "", ""),
- JSR286_245(new TCK(245), "", ""),
- JSR286_246(new TCK(246), "", ""),
- JSR286_247(new TCK(247), "", ""),
- JSR286_248(new TCK(248), "", ""),
- JSR286_249(new TCK(249), "", ""),
- JSR286_250(new TCK(250), "", ""),
- JSR286_251(new TCK(251), "", ""),
- JSR286_252(new TCK(252), "", ""),
- JSR286_253(new TCK(253), "", ""),
- JSR286_254(new TCK(254), "", ""),
- JSR286_255(new TCK(255), "", ""),
- JSR286_256(new TCK(256), "", ""),
- JSR286_257(new TCK(257), "", ""),
- JSR286_258(new TCK(258), "", ""),
- JSR286_259(new TCK(259), "", ""),
- JSR286_260(new TCK(260), "", ""),
- JSR286_261(new TCK(261), "", ""),
- JSR286_262(new TCK(262), "", ""),
- JSR286_263(new TCK(263), "", ""),
- JSR286_264(new TCK(264), "", ""),
- JSR286_265(new TCK(265), "", ""),
- JSR286_266(new TCK(266), "", ""),
- JSR286_267(new TCK(267), "", ""),
- JSR286_268(new TCK(268), "", ""),
- JSR286_269(new TCK(269), "", ""),
- JSR286_270(new TCK(270), "", ""),
- JSR286_271(new TCK(271), "", ""),
- JSR286_272(new TCK(272), "", ""),
- JSR286_273(new TCK(273), "", ""),
- JSR286_274(new TCK(274), "", ""),
- JSR286_275(new TCK(275), "", ""),
- JSR286_276(new TCK(276), "", ""),
- JSR286_277(new TCK(277), "", ""),
- JSR286_278(new TCK(278), "", ""),
- JSR286_279(new TCK(279), "", ""),
- JSR286_280(new TCK(280), "", ""),
- JSR286_281(new TCK(281), "", ""),
- JSR286_282(new TCK(282), "", ""),
- JSR286_283(new TCK(283), "", ""),
- JSR286_284(new TCK(284), "", ""),
- JSR286_285(new TCK(285), "", ""),
- JSR286_286(new TCK(286), "", ""),
- JSR286_287(new TCK(287), "", ""),
- JSR286_288(new TCK(288), "", ""),
- JSR286_289(new TCK(289), "", ""),
- JSR286_290(new TCK(290), "", ""),
- JSR286_291(new TCK(291), "", ""),
+ // PLT.19.4.3 Request and Response Objects for Forwarded Servlets/JSPs from within the Action and Event processing Methods
+ JSR286_243(new TCK(243), "PLT.19.4.3", "The following methods of the HttpServletRequest must return null: " +
+ "getRemoteAddr, getRemoteHost, getLocalAddress, getLocalName, getRealPath, and getRequestURL."),
+ JSR286_244(new TCK(244), "PLT.19.4.3", "The following methods of the HttpServletRequest must return ‘0’: " +
+ "getRemotePort and getLocalPort."),
+ JSR286_245(new TCK(245), "PLT.19.4.3", "The following methods of the HttpServletRequest must return the path " +
+ "and query string information used to obtain the PortletRequestDispatcher object: getPathInfo, getPathTranslated, " +
+ "getQueryString, getRequestURI and getServletPath."),
+ JSR286_246(new TCK(246), "PLT.19.4.3", "The following methods of the HttpServletRequest must be equivalent to " +
+ "the methods of the PortletRequest of similar name: getScheme, getServerName, getServerPort, getAttribute, " +
+ "getAttributeNames, setAttribute, removeAttribute, getLocale, getLocales, isSecure, getAuthType, getContextPath, " +
+ "getRemoteUser, getUserPrincipal, getRequestedSessionId, isRequestedSessionIdValid, getCookies."),
+ JSR286_247(new TCK(247), "PLT.19.4.3", "The following methods of the HttpServletRequest must be equivalent to the " +
+ "methods of the PortletRequest of similar name with the provision defined in PLT.18.1.1 Query Strings in Request " +
+ "Dispatcher Paths Section: getParameter, getParameterNames, getParameterValues and getParameterMap."),
+ JSR286_248(new TCK(248), "PLT.19.4.3", "In case of a forward from processAction, the following methods of the " +
+ "HttpServletRequest must be based on the corresponding methods of the\n" +
+ "ActionRequest: getCharacterEncoding, setCharacterEncoding, getContentType, getInputStream, getContentLength, " +
+ "getMethod and getReader."),
+ JSR286_249(new TCK(249), "PLT.19.4.3", "In case of a forward from processEvent, the following methods of the " +
+ "HttpServletRequest must do no operations and/or return null: getCharacterEncoding, setCharacterEncoding, " +
+ "getContentType, getInputStream and getReader."),
+ JSR286_250(new TCK(250), "PLT.19.4.3", "The getContentLength method of the HttpServletRequest must return 0."),
+ JSR286_251(new TCK(251), "PLT.19.4.3", "The getMethod method of the HttpServletRequest must be based on the " +
+ "corresponding method of the ActionRequest triggering this event."),
+ JSR286_252(new TCK(252), "PLT.19.4.3", "The following methods of the HttpServletRequest must be based on the " +
+ "properties provided by the getProperties method of the PortletRequest interface: getHeader, getHeaders, " +
+ "getHeaderNames, getDateHeader and getIntHeader."),
+ JSR286_253(new TCK(253), "PLT.19.4.3", "The following methods of the HttpServletRequest must provide the " +
+ "functionality defined by the Servlet Specification: getRequestDispatcher, isUserInRole, getSession, " +
+ "isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL and isRequestedSessionIdFromUrl."),
+ JSR286_254(new TCK(254), "PLT.19.4.3", "The getProtocol method of the HttpServletRequest must always return " +
+ "‘HTTP/1.1’."),
+ JSR286_255(new TCK(255), "PLT.19.4.3", "The following methods of the HttpServletResponse must return null: " +
+ "encodeRedirectURL, encodeRedirectUrl, getCharacterEncoding, getContentType, getLocale, and getBufferSize."),
+ JSR286_256(new TCK(256), "PLT.19.4.3", "The following methods of the HttpServletResponse must return an " +
+ "outputstream / writer that ignores any output written to it: getOutputStream and getWriter."),
+ JSR286_257(new TCK(257), "PLT.19.4.3", "The following methods of the HttpServletResponse must be equivalent " +
+ "to the methods of the ActionResponse/EventResponse of similar name: encodeURL and encodeUrl."),
+ JSR286_258(new TCK(258), "PLT.19.4.3", "The following methods of the HttpServletResponse must perform no " +
+ "operations: resetBuffer, reset, setContentType, setContentLength,\n" +
+ "setCharacterEncoding, setLocale, sendError, setDateHeader, addDateHeader, setHeader, addHeader, setIntHeader, " +
+ "addIntHeader, setStatus, setBufferSize and flushBuffer."),
+ JSR286_259(new TCK(259), "PLT.19.4.3", "The addCookie method of the HttpServletResponse must be based on " +
+ "addProperty method of the ActionResponse/EventResponse interface."),
+ JSR286_260(new TCK(260), "PLT.19.4.3", "The containsHeader method of the HttpServletResponse must return false."),
+ JSR286_261(new TCK(261), "PLT.19.4.3", "The isCommitted method of the HttpServletResponse must return false."),
+ // PLT.19.4.4 Request and Response Objects for Forwarded Servlets/JSPs from within the Render Method
+ JSR286_262(new TCK(262), "PLT.19.4.4", "The following methods of the HttpServletRequest must return null: " +
+ "getRemoteAddr, getRemoteHost, getLocalAddress, getLocalName, getRealPath, and getRequestURL."),
+ JSR286_263(new TCK(263), "PLT.19.4.4", "The following methods of the HttpServletRequest must return ‘0’: " +
+ "getRemotePort and getLocalPort."),
+ JSR286_264(new TCK(264), "PLT.19.4.4", "The following methods of the HttpServletRequest must return the " +
+ "path and query string information used to obtain the PortletRequestDispatcher object: getPathInfo, " +
+ "getPathTranslated, getQueryString, getRequestURI and getServletPath."),
+ JSR286_265(new TCK(265), "PLT.19.4.4", "The following methods of the HttpServletRequest must be equivalent " +
+ "to the methods of the PortletRequest of similar name: getScheme, getServerName, getServerPort, getAttribute, " +
+ "getAttributeNames, setAttribute, removeAttribute, getLocale, getLocales, isSecure, getAuthType, " +
+ "getContextPath, getRemoteUser, getUserPrincipal, getRequestedSessionId, isRequestedSessionIdValid, getCookies."),
+ JSR286_266(new TCK(266), "PLT.19.4.4", "The following methods of the HttpServletRequest must be equivalent " +
+ "to the methods of the PortletRequest of similar name with the provision defined in PLT.18.1.1 Query Strings " +
+ "in Request Dispatcher Paths Section: getParameter, getParameterNames, getParameterValues and getParameterMap."),
+ JSR286_267(new TCK(267), "PLT.19.4.4", "The following methods of the HttpServletRequest must do no operations " +
+ "and return null: getCharacterEncoding, setCharacterEncoding, getContentType, getInputStream and getReader."),
+ JSR286_268(new TCK(268), "PLT.19.4.4", "The getContentLength method of the HttpServletRequest must return 0."),
+ JSR286_269(new TCK(269), "PLT.19.4.4", "The following methods of the HttpServletRequest must be based on the " +
+ "properties provided by the getProperties method of the PortletRequest interface: getHeader, getHeaders, " +
+ "getHeaderNames, getDateHeader and getIntHeader."),
+ JSR286_270(new TCK(270), "PLT.19.4.4", "The following methods of the HttpServletRequest must provide the " +
+ "functionality defined by the Servlet Specification: getRequestDispatcher, isUserInRole, getSession, " +
+ "isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL and isRequestedSessionIdFromUrl."),
+ JSR286_271(new TCK(271), "PLT.19.4.4", "The getMethod method of the HttpServletRequest must always return ‘GET’."),
+ JSR286_272(new TCK(272), "PLT.19.4.4", "The getProtocol method of the HttpServletRequest must always return ‘HTTP/1.1’."),
+ JSR286_273(new TCK(273), "PLT.19.4.4", "The following methods of the HttpServletResponse must return null: " +
+ "encodeRedirectURL and encodeRedirectUrl."),
+ JSR286_274(new TCK(274), "PLT.19.4.4", "The following methods of the HttpServletResponse must be equivalent " +
+ "to the methods of the RenderResponse of similar name: getCharacterEncoding, setBufferSize, flushBuffer, " +
+ "resetBuffer, reset, getBufferSize, getLocale, isCommitted, getOutputStream, getWriter, setContentType, " +
+ "encodeURL and encodeUrl."),
+ JSR286_275(new TCK(275), "PLT.19.4.4", "The following methods of the HttpServletResponse must perform no " +
+ "operations: setContentLength, setLocale, sendError, sendRedirect, and setStatus."),
+ JSR286_276(new TCK(276), "PLT.19.4.4", "The containsHeader method of the HttpServletResponse must return false."),
+ JSR286_277(new TCK(277), "PLT.19.4.4", "The following methods of the HttpServletResponse must be based on " +
+ "the properties provided by the setProperties/addProperties method of the RenderResponse interface: addCookie, " +
+ "setDateHeader, addDateHeader, setHeader, addHeader, setIntHeader, addIntHeader."),
+
+ // PLT.19.4.5 Request and Response Objects for Forwarded Servlets/JSPs from within the ServeResource Method
+ JSR286_278(new TCK(278), "PLT.19.4.5", "The following methods of the HttpServletRequest must return null: " +
+ "getRemoteAddr, getRemoteHost, getLocalAddress, getLocalName, getRealPath, and getRequestURL."),
+ JSR286_279(new TCK(279), "PLT.19.4.5", "The following methods of the HttpServletRequest must return ‘0’: " +
+ "getRemotePort and getLocalPort."),
+ JSR286_280(new TCK(280), "PLT.19.4.5", "The following methods of the HttpServletRequest must return the " +
+ "path and query string information used to obtain the PortletRequestDispatcher object: getPathInfo, " +
+ "getPathTranslated, getQueryString, getRequestURI and getServletPath."),
+ JSR286_281(new TCK(281), "PLT.19.4.5", "The following methods of the HttpServletRequest must be equivalent " +
+ "to the methods of the PortletRequest of similar name: getScheme, getServerName, getServerPort, getAttribute, " +
+ "getAttributeNames, setAttribute, removeAttribute, getLocale, getLocales, isSecure, getAuthType, \n" +
+ "getContextPath, getRemoteUser, getUserPrincipal, getRequestedSessionId, isRequestedSessionIdValid, getCookies."),
+ JSR286_282(new TCK(282), "PLT.19.4.5", "The following methods of the HttpServletRequest must be equivalent to " +
+ "the methods of the ResourceRequest of similar name: getCharacterEncoding, setCharacterEncoding, getContentType, getMethod and getReader."),
+ JSR286_283(new TCK(283), "PLT.19.4.5", "The following methods of the HttpServletRequest must be equivalent to " +
+ "the methods of the PortletRequest of similar name with the provision defined in PLT.18.1.1 Query Strings " +
+ "in Request Dispatcher Paths Section: getParameter, getParameterNames, getParameterValues and getParameterMap."),
+ JSR286_284(new TCK(284), "PLT.19.4.5", "The following methods of the HttpServletRequest must be based on the " +
+ "properties provided by the getProperties method of the PortletRequest interface: getHeader, getHeaders, " +
+ "getHeaderNames, getDateHeader and getIntHeader."),
+ JSR286_285(new TCK(285), "PLT.19.4.5", "The following methods of the HttpServletRequest must provide the " +
+ "functionality defined by the Servlet Specification: getRequestDispatcher, isUserInRole, getSession, " +
+ "isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL and isRequestedSessionIdFromUrl."),
+ JSR286_286(new TCK(286), "PLT.19.4.5", "The getProtocol method of the HttpServletRequest must always return ‘HTTP/1.1’."),
+ JSR286_287(new TCK(287), "PLT.19.4.5", "The following methods of the HttpServletResponse must return null: " +
+ "encodeRedirectURL and encodeRedirectUrl."),
+ JSR286_288(new TCK(288), "PLT.19.4.5", "The following methods of the HttpServletResponse must be equivalent " +
+ "to the methods of the ResourceResponse of similar name: getCharacterEncoding, setContentType, setBufferSize, " +
+ "flushBuffer, resetBuffer, reset, getBufferSize, isCommitted, getOutputStream, getWriter, getLocale, encodeURL " +
+ "and encodeUrl."),
+ JSR286_289(new TCK(289), "PLT.19.4.5", "The following methods of the HttpServletResponse must perform no operations: " +
+ "sendError, sendRedirect."),
+ JSR286_290(new TCK(290), "PLT.19.4.5", "The containsHeader method of the HttpServletResponse must return false."),
+
+ //
+ JSR286_291(new TCK(291), "PLT.19.5", ""),
+
+
// PLT.20 Portlet Filter
JSR286_292(new TCK(292), "", ""),
-
- //..
-
+ JSR286_293(new TCK(293), "", ""),
+ JSR286_294(new TCK(294), "", ""),
+ JSR286_295(new TCK(295), "", ""),
+ JSR286_296(new TCK(296), "", ""),
+ JSR286_297(new TCK(297), "", ""),
+ JSR286_298(new TCK(298), "", ""),
+ JSR286_299(new TCK(299), "", ""),
+ JSR286_300(new TCK(300), "", ""),
JSR286_301(new TCK(301), "", ""),
-
// PLT.21 User Information
JSR286_302(new TCK(302), "", ""),
18 years, 3 months
JBoss Portal SVN: r9632 - modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-01-29 10:47:35 -0500 (Tue, 29 Jan 2008)
New Revision: 9632
Added:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/IncludedRequestAttributesTestCase.java
Log:
- migrated included request attribute test case
Added: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/IncludedRequestAttributesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/IncludedRequestAttributesTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/IncludedRequestAttributesTestCase.java 2008-01-29 15:47:35 UTC (rev 9632)
@@ -0,0 +1,169 @@
+/******************************************************************************
+ * 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.test.portlet.jsr286.tck.dispatcher;
+
+import org.jboss.portal.unit.PortletTestCase;
+import org.jboss.portal.unit.PortletTestContext;
+import org.jboss.portal.unit.base.AbstractUniversalTestPortlet;
+import org.jboss.portal.unit.actions.PortletRenderTestAction;
+import org.jboss.portal.unit.actions.ServletServiceTestAction;
+import org.jboss.portal.unit.actions.PortletActionTestAction;
+import org.jboss.portal.unit.actions.PortletEventTestAction;
+import org.jboss.portal.unit.actions.PortletResourceTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.test.portlet.framework.UTS1;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNotNull;
+import static org.jboss.unit.api.Assert.assertEquals;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletResponse;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.EventRequest;
+import javax.portlet.EventResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+(a)TestCase({Assertion.JSR168_128})
+public class IncludedRequestAttributesTestCase
+{
+
+ /** . */
+ private Object _config;
+
+ /** . */
+ private Object _request;
+
+ /** . */
+ private Object _response;
+
+ public IncludedRequestAttributesTestCase(PortletTestCase seq)
+ {
+ seq.bindAction(0, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ return new InvokeGetResponse(response.createActionURL().toString());
+ }
+ });
+ seq.bindAction(1, UTP1.ACTION_JOIN_POINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ dispatch(portlet, request, response);
+
+ //
+ response.setEvent("Event", null);
+ }
+ });
+ seq.bindAction(1, UTP1.EVENT_JOIN_POINT, new PortletEventTestAction()
+ {
+ protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ dispatch(portlet, request, response);
+ }
+ });
+ seq.bindAction(1, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ dispatch(portlet, request, response);
+
+ //
+ return new InvokeGetResponse(response.createResourceURL().toString());
+ }
+ });
+ seq.bindAction(1, UTS1.SERVICE_JOIN_POINT, service);
+ seq.bindAction(2, UTP1.RESOURCE_JOIN_POINT, new PortletResourceTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, ResourceRequest request, ResourceResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ dispatch(portlet, request, response);
+
+ //
+ return new EndTestResponse();
+ }
+ });
+ seq.bindAction(2, UTS1.SERVICE_JOIN_POINT, service);
+ }
+
+ private ServletServiceTestAction service = new ServletServiceTestAction()
+ {
+ protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
+ {
+ _config = request.getAttribute("javax.portlet.config");
+ _request = request.getAttribute("javax.portlet.request");
+ _response = request.getAttribute("javax.portlet.response");
+ return null;
+ }
+ };
+
+ private void dispatch(Portlet portlet, PortletRequest request, PortletResponse response) throws PortletException, IOException
+ {
+ _config = null;
+ _request = null;
+ _response = null;
+
+ //
+ PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getRequestDispatcher("/universalServletA");
+ dispatcher.include(request, response);
+
+ assertEquals(((AbstractUniversalTestPortlet)portlet).getPortletConfig(), _config);
+ assertEquals(request, _request);
+ assertEquals(response, _response);
+
+ //
+ dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getNamedDispatcher("UniversalServletA");
+ assertNotNull(dispatcher);
+ dispatcher.include(request, response);
+
+ //
+ assertEquals(((AbstractUniversalTestPortlet)portlet).getPortletConfig(), _config);
+ assertEquals(request, _request);
+ assertEquals(response, _response);
+
+ //
+ _config = null;
+ _request = null;
+ _response = null;
+ }
+}
\ No newline at end of file
18 years, 3 months
JBoss Portal SVN: r9631 - in modules/portlet/trunk: portlet/src/test/java/org/jboss/portal/test/portlet/framework and 4 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-01-29 10:02:46 -0500 (Tue, 29 Jan 2008)
New Revision: 9631
Added:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/framework/UTS3.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/framework/UTS4.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/QueryStringInRequestDispatcherTestCase.java
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/DispatchedHttpServletRequest.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/framework/UTS1.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/framework/UTS2.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/PortletTestContext.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/base/AbstractTestGenericPortlet.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/base/AbstractUniversalTestPortlet.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/base/AbstractUniversalTestServlet.java
modules/portlet/trunk/test/src/test/resources/jsr286/tck/dispatcher-war/WEB-INF/portlet.xml
modules/portlet/trunk/test/src/test/resources/jsr286/tck/dispatcher-war/WEB-INF/web.xml
Log:
- minor improvements to the portlet test framework
- migrated test cases for query parameters
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/DispatchedHttpServletRequest.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/DispatchedHttpServletRequest.java 2008-01-29 14:12:04 UTC (rev 9630)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/DispatchedHttpServletRequest.java 2008-01-29 15:02:46 UTC (rev 9631)
@@ -150,8 +150,12 @@
//
if (queryString.length() > 0)
{
- this.parameters = ParameterMap.clone(preq.getParameterMap());
- this.parameters.putAll(QueryStringParser.getInstance().parseQueryString(queryString));
+ ParameterMap tmp = new ParameterMap();
+ tmp.putAll(QueryStringParser.getInstance().parseQueryString(queryString));
+ tmp.append(preq.getParameterMap());
+
+ //
+ this.parameters = tmp;
}
else
{
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/framework/UTS1.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/framework/UTS1.java 2008-01-29 14:12:04 UTC (rev 9630)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/framework/UTS1.java 2008-01-29 15:02:46 UTC (rev 9631)
@@ -41,11 +41,11 @@
public static final String NAME = "ServletA";
- public final static JoinPoint SERVICE_JOIN_POINT = new JoinPoint(UTS1.NAME, JoinPointType.SERVLET_SERVICE);
+ public final static JoinPoint SERVICE_JOIN_POINT = new JoinPoint(NAME, JoinPointType.SERVLET_SERVICE);
protected String createComponentId(Class clazz)
{
- return UTS1.NAME;
+ return NAME;
}
public void reset()
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/framework/UTS2.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/framework/UTS2.java 2008-01-29 14:12:04 UTC (rev 9630)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/framework/UTS2.java 2008-01-29 15:02:46 UTC (rev 9631)
@@ -41,11 +41,11 @@
public static final String NAME = "ServletB";
- public final static JoinPoint SERVICE_JOIN_POINT = new JoinPoint(UTS2.NAME, JoinPointType.SERVLET_SERVICE);
+ public final static JoinPoint SERVICE_JOIN_POINT = new JoinPoint(NAME, JoinPointType.SERVLET_SERVICE);
protected String createComponentId(Class clazz)
{
- return UTS2.NAME;
+ return NAME;
}
public void reset()
Added: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/framework/UTS3.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/framework/UTS3.java (rev 0)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/framework/UTS3.java 2008-01-29 15:02:46 UTC (rev 9631)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * 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.test.portlet.framework;
+
+import org.jboss.portal.unit.JoinPoint;
+import org.jboss.portal.unit.base.AbstractUniversalTestServlet;
+import org.jboss.portal.unit.JoinPointType;
+import org.jboss.portal.unit.annotations.TestActor;
+
+/**
+ * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
+ * @version $Revision: 5568 $
+ */
+(a)TestActor(id=UTS3.NAME)
+public class UTS3 extends AbstractUniversalTestServlet
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -6331478437141464198L;
+
+ public static ThreadLocal local = new ThreadLocal();
+
+ public static final String NAME = "ServletC";
+
+ public final static JoinPoint SERVICE_JOIN_POINT = new JoinPoint(NAME, JoinPointType.SERVLET_SERVICE);
+
+ protected String createComponentId(Class clazz)
+ {
+ return NAME;
+ }
+
+ public void reset()
+ {
+ local = new ThreadLocal();
+ }
+}
\ No newline at end of file
Added: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/framework/UTS4.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/framework/UTS4.java (rev 0)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/framework/UTS4.java 2008-01-29 15:02:46 UTC (rev 9631)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * 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.test.portlet.framework;
+
+import org.jboss.portal.unit.JoinPoint;
+import org.jboss.portal.unit.base.AbstractUniversalTestServlet;
+import org.jboss.portal.unit.JoinPointType;
+import org.jboss.portal.unit.annotations.TestActor;
+
+/**
+ * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
+ * @version $Revision: 5568 $
+ */
+(a)TestActor(id=UTS4.NAME)
+public class UTS4 extends AbstractUniversalTestServlet
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -6331478437141464198L;
+
+ public static ThreadLocal local = new ThreadLocal();
+
+ public static final String NAME = "ServletD";
+
+ public final static JoinPoint SERVICE_JOIN_POINT = new JoinPoint(NAME, JoinPointType.SERVLET_SERVICE);
+
+ protected String createComponentId(Class clazz)
+ {
+ return NAME;
+ }
+
+ public void reset()
+ {
+ local = new ThreadLocal();
+ }
+}
\ No newline at end of file
Added: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/QueryStringInRequestDispatcherTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/QueryStringInRequestDispatcherTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/dispatcher/QueryStringInRequestDispatcherTestCase.java 2008-01-29 15:02:46 UTC (rev 9631)
@@ -0,0 +1,217 @@
+/******************************************************************************
+ * 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.test.portlet.jsr286.tck.dispatcher;
+
+import org.jboss.portal.unit.PortletTestCase;
+import org.jboss.portal.unit.PortletTestContext;
+import org.jboss.portal.unit.base.AbstractUniversalTestPortlet;
+import org.jboss.portal.unit.actions.PortletRenderTestAction;
+import org.jboss.portal.unit.actions.PortletActionTestAction;
+import org.jboss.portal.unit.actions.ServletServiceTestAction;
+import org.jboss.portal.unit.actions.PortletEventTestAction;
+import org.jboss.portal.unit.actions.PortletResourceTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.test.portlet.framework.UTS1;
+import org.jboss.portal.test.portlet.framework.UTS2;
+import org.jboss.portal.test.portlet.framework.UTS3;
+import org.jboss.portal.test.portlet.framework.UTS4;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+import static org.jboss.unit.api.Assert.*;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.PortletURL;
+import javax.portlet.EventRequest;
+import javax.portlet.EventResponse;
+import javax.portlet.ResourceURL;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+(a)TestCase({Assertion.JSR168_123})
+public class QueryStringInRequestDispatcherTestCase
+{
+
+ public QueryStringInRequestDispatcherTestCase(PortletTestCase seq)
+ {
+ seq.bindAction(0, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletURL actionURL = response.createActionURL();
+ actionURL.setParameter("key1", "k1actionvalue");
+ actionURL.setParameter("key3", "k3actionvalue");
+ return new InvokeGetResponse(actionURL.toString());
+ }
+ });
+
+ seq.bindAction(1, UTP1.ACTION_JOIN_POINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ Map<String, String[]> actionParams = new HashMap<String, String[]>();
+ actionParams.put("key1", new String[]{"k1actionvalue"});
+ actionParams.put("key3", new String[]{"k3actionvalue"});
+ assertParameterMap(actionParams, request);
+
+ //
+ String path = "/universalServletA?key1=k1value1&key2=k2value1";
+ PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getRequestDispatcher(path);
+ dispatcher.include(request, response);
+
+ //assert that params from query string doesn't last longer then in include call
+ assertParameterMap(actionParams, request);
+
+ //
+ response.setEvent("Event", null);
+ }
+ });
+ seq.bindAction(1, UTS1.SERVICE_JOIN_POINT, new ServletServiceTestAction()
+ {
+ protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
+ {
+ assertEquals(new String[]{"k1value1","k1actionvalue"}, request.getParameterValues("key1"));
+ assertEquals(new String[]{"k2value1"}, request.getParameterValues("key2"));
+ assertEquals(new String[]{"k3actionvalue"}, request.getParameterValues("key3"));
+ return null;
+ }
+ });
+
+ seq.bindAction(1, UTP1.EVENT_JOIN_POINT, new PortletEventTestAction()
+ {
+ protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ Map<String, String[]> eventParams = new HashMap<String, String[]>();
+ assertParameterMap(eventParams, request);
+
+ //
+ String path = "/universalServletB?key1=k1value1&key2=k2value1";
+ PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getRequestDispatcher(path);
+ dispatcher.include(request, response);
+
+ //assert that params from query string doesn't last longer then in include call
+ assertParameterMap(eventParams, request);
+
+ //set some render params to test them in dispatcher include (precedense)
+ response.setRenderParameter("key1", "k1rendervalue");
+ response.setRenderParameter("key3", "k3rendervalue");
+ }
+ });
+ seq.bindAction(1, UTS2.SERVICE_JOIN_POINT, new ServletServiceTestAction()
+ {
+ protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
+ {
+ assertEquals(new String[]{"k1value1"}, request.getParameterValues("key1"));
+ assertEquals(new String[]{"k2value1"}, request.getParameterValues("key2"));
+ assertEquals(null, request.getParameterValues("key3"));
+ return null;
+ }
+ });
+
+ seq.bindAction(1, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ Map<String, String[]> renderParams = new HashMap<String, String[]>();
+ renderParams.put("key1", new String[]{"k1rendervalue"});
+ renderParams.put("key3", new String[]{"k3rendervalue"});
+ assertParameterMap(renderParams, request);
+
+ //
+ String path = "/universalServletC?key1=k1value1&key2=k2value1";
+ PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getRequestDispatcher(path);
+ dispatcher.include(request, response);
+
+ //assert that params from query string doesn't last longer then in include call
+ assertParameterMap(renderParams, request);
+
+ //
+ ResourceURL resourceURL = response.createResourceURL();
+ resourceURL.setParameter("key1", "k1resourcevalue");
+ resourceURL.setParameter("key3", "k3resourcevalue");
+ return new InvokeGetResponse(resourceURL.toString());
+ }
+ });
+ seq.bindAction(1, UTS3.SERVICE_JOIN_POINT, new ServletServiceTestAction()
+ {
+ protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
+ {
+ assertEquals(new String[]{"k1value1","k1rendervalue"}, request.getParameterValues("key1"));
+ assertEquals(new String[]{"k2value1"}, request.getParameterValues("key2"));
+ assertEquals(new String[]{"k3rendervalue"}, request.getParameterValues("key3"));
+ return null;
+ }
+ });
+
+ seq.bindAction(2, UTP1.RESOURCE_JOIN_POINT, new PortletResourceTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, ResourceRequest request, ResourceResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ Map<String, String[]> resourceParams = new HashMap<String, String[]>();
+ resourceParams.put("key1", new String[]{"k1resourcevalue","k1rendervalue"});
+ resourceParams.put("key3", new String[]{"k3resourcevalue","k3rendervalue"});
+ assertParameterMap(resourceParams, request);
+
+ //
+ String path = "/universalServletD?key1=k1value1&key2=k2value1";
+ PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getRequestDispatcher(path);
+ dispatcher.include(request, response);
+
+ //assert that params from query string doesn't last longer then in include call
+ assertParameterMap(resourceParams, request);
+
+ //
+ return new EndTestResponse();
+ }
+ });
+ seq.bindAction(2, UTS4.SERVICE_JOIN_POINT, new ServletServiceTestAction()
+ {
+ protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
+ {
+ assertEquals(new String[]{"k1value1","k1resourcevalue","k1rendervalue"}, request.getParameterValues("key1"));
+ assertEquals(new String[]{"k2value1"}, request.getParameterValues("key2"));
+ assertEquals(new String[]{"k3resourcevalue","k3rendervalue"}, request.getParameterValues("key3"));
+ return null;
+ }
+ });
+ }
+}
\ No newline at end of file
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/PortletTestContext.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/PortletTestContext.java 2008-01-29 14:12:04 UTC (rev 9630)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/PortletTestContext.java 2008-01-29 15:02:46 UTC (rev 9631)
@@ -26,6 +26,7 @@
import org.jboss.portal.common.NotYetImplemented;
import org.jboss.portal.unit.JoinPointType;
import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.FailureResponse;
import org.jboss.unit.remote.RequestContext;
import org.jboss.unit.remote.ResponseContext;
import org.jboss.unit.remote.http.HttpHeaders;
@@ -75,7 +76,8 @@
return portletTestCase.getActorId(requestContext.getRequestCount(), joinPointType);
}
- public void setResponse(DriverResponse response)
+ // We don't expose it as it is can be used in a wrong manner, rather use update response method
+ private void setResponse(DriverResponse response)
{
responseContext = new ResponseContext(response, new HashMap<String, Serializable>());
}
@@ -85,6 +87,35 @@
return responseContext != null ? responseContext.getResponse() : null;
}
+ /**
+ * Update the context response with the provided response. The update will occur
+ * if there is no previous existing response. If there is an existing response
+ * this one will be overwrited only if it is not a failure and the provided
+ * response is a failure.
+ *
+ * @param response the new response
+ */
+ public void updateResponse(DriverResponse response)
+ {
+ if (response == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ DriverResponse existingResponse = getResponse();
+
+ //
+ if (existingResponse instanceof FailureResponse)
+ {
+ // We keep the existing failure, since we want it reported
+ }
+ else if (response instanceof FailureResponse || existingResponse == null)
+ {
+ // We have a failure response and the context contains no response or a non failure response
+ setResponse(response);
+ }
+ }
+
public int getRequestCount()
{
return requestContext.getRequestCount();
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/base/AbstractTestGenericPortlet.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/base/AbstractTestGenericPortlet.java 2008-01-29 14:12:04 UTC (rev 9630)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/base/AbstractTestGenericPortlet.java 2008-01-29 15:02:46 UTC (rev 9631)
@@ -85,7 +85,7 @@
}
//
- context.setResponse(response);
+ context.updateResponse(response);
}
public void render(RenderRequest req, RenderResponse resp) throws PortletException, IOException
@@ -118,7 +118,7 @@
//
if (response != null)
{
- context.setResponse(response);
+ context.updateResponse(response);
}
}
}
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/base/AbstractUniversalTestPortlet.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/base/AbstractUniversalTestPortlet.java 2008-01-29 14:12:04 UTC (rev 9630)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/base/AbstractUniversalTestPortlet.java 2008-01-29 15:02:46 UTC (rev 9631)
@@ -153,36 +153,33 @@
TestAction action = portletTestCase.getAction(ctx.getRequestCount(), NodeId.locate(), actionJoinPoint);
//
- if (action == null)
- {
- ctx.setResponse(new FailureResponse(Failure.createAssertionFailure("No action for " + ctx.getRequestCount() + " " + NodeId.locate() + " " + actionJoinPoint)));
- }
+ DriverResponse response;
if (action instanceof PortletTestAction)
{
log.debug("Found action for jointpoint " + actionJoinPoint + " : " + action);
//
- DriverResponse response = ((PortletTestAction)action).execute(this, req, resp, ctx);
-
- //
- ctx.setResponse(response);
+ response = ((PortletTestAction)action).execute(this, req, resp, ctx);
}
else if (action instanceof PortletActionTestAction)
{
log.debug("Found action for jointpoint " + actionJoinPoint + " : " + action);
//
- DriverResponse response = ((PortletActionTestAction)action).execute(this, req, resp, ctx);
-
- //
- ctx.setResponse(response);
+ response = ((PortletActionTestAction)action).execute(this, req, resp, ctx);
}
else
{
- ctx.setResponse(new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
+ response = new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
" " + NodeId.locate() + " " + actionJoinPoint + " does not have the right type but has the type " +
- action.getClass().getName())));
+ action.getClass().getName()));
}
+
+ //
+ if (response != null)
+ {
+ ctx.updateResponse(response);
+ }
}
}
@@ -209,32 +206,33 @@
//
if (action != null)
{
+ DriverResponse response = null;
if (action instanceof PortletTestAction)
{
log.debug("Found action for jointpoint " + eventJoinPoint + " : " + action);
//
- DriverResponse response = ((PortletTestAction)action).execute(this, req, resp, ctx);
-
- //
- ctx.setResponse(response);
+ response = ((PortletTestAction)action).execute(this, req, resp, ctx);
}
- if (action instanceof PortletEventTestAction)
+ else if (action instanceof PortletEventTestAction)
{
log.debug("Found action for jointpoint " + eventJoinPoint + " : " + action);
//
- DriverResponse response = ((PortletEventTestAction)action).execute(this, req, resp, ctx);
-
- //
- ctx.setResponse(response);
+ response = ((PortletEventTestAction)action).execute(this, req, resp, ctx);
}
else
{
- ctx.setResponse(new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
+ response = new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
" " + NodeId.locate() + " " + actionJoinPoint + " does not have the right type but has the type " +
- action.getClass().getName())));
+ action.getClass().getName()));
}
+
+ //
+ if (response != null)
+ {
+ ctx.updateResponse(response);
+ }
}
}
}
@@ -266,14 +264,12 @@
}
//
- boolean invoked = false;
// Get the action
TestAction action = null;
PortletTestCase portletTestCase = getSequence(ctx.getTestName());
if (portletTestCase != null)
{
action = portletTestCase.getAction(ctx.getRequestCount(), NodeId.locate(), renderJoinPoint);
-
}
//
@@ -305,18 +301,7 @@
// If we have one result it is meant to be returned to the client
if (response != null)
{
- DriverResponse existingResponse = ctx.getResponse();
-
- //
- if (existingResponse instanceof FailureResponse)
- {
- // We keep the existing failure, since we want it reported
- }
- else if (response instanceof FailureResponse || existingResponse == null)
- {
- // We have a failure response and the context contains no response or a non failure response
- ctx.setResponse(response);
- }
+ ctx.updateResponse(response);
}
}
else
@@ -346,32 +331,33 @@
}
//
+ DriverResponse response;
if (action instanceof PortletTestAction)
{
log.debug("Found action for joinpoint " + resourceJoinPoint + " : " + action);
// Get the result that must exist since it is the only joinpoint invoked during this request
- DriverResponse response = ((PortletTestAction)action).execute(this, req, resp, ctx);
-
- //
- ctx.setResponse(response);
+ response = ((PortletTestAction)action).execute(this, req, resp, ctx);
}
else if (action instanceof PortletResourceTestAction)
{
log.debug("Found action for joinpoint " + resourceJoinPoint + " : " + action);
// Get the result that must exist since it is the only joinpoint invoked during this request
- DriverResponse response = ((PortletResourceTestAction)action).execute(this, req, resp, ctx);
-
- //
- ctx.setResponse(response);
+ response = ((PortletResourceTestAction)action).execute(this, req, resp, ctx);
}
else
{
- ctx.setResponse(new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
+ response = new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
" " + NodeId.locate() + " " + resourceJoinPoint + " does not have the right type but has the type " +
- action.getClass().getName())));
+ action.getClass().getName()));
}
+
+ //
+ if (response != null)
+ {
+ ctx.updateResponse(response);
+ }
}
public void destroy()
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/base/AbstractUniversalTestServlet.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/base/AbstractUniversalTestServlet.java 2008-01-29 14:12:04 UTC (rev 9630)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/base/AbstractUniversalTestServlet.java 2008-01-29 15:02:46 UTC (rev 9631)
@@ -92,7 +92,7 @@
DriverResponse dr = ((ServletServiceTestAction)action).execute(this, request, response, ctx);
if (dr != null)
{
- ctx.setResponse(dr);
+ ctx.updateResponse(dr);
}
}
Modified: modules/portlet/trunk/test/src/test/resources/jsr286/tck/dispatcher-war/WEB-INF/portlet.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/jsr286/tck/dispatcher-war/WEB-INF/portlet.xml 2008-01-29 14:12:04 UTC (rev 9630)
+++ modules/portlet/trunk/test/src/test/resources/jsr286/tck/dispatcher-war/WEB-INF/portlet.xml 2008-01-29 15:02:46 UTC (rev 9631)
@@ -22,10 +22,10 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
- version="1.0">
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ version="2.0">
<portlet>
Modified: modules/portlet/trunk/test/src/test/resources/jsr286/tck/dispatcher-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/jsr286/tck/dispatcher-war/WEB-INF/web.xml 2008-01-29 14:12:04 UTC (rev 9630)
+++ modules/portlet/trunk/test/src/test/resources/jsr286/tck/dispatcher-war/WEB-INF/web.xml 2008-01-29 15:02:46 UTC (rev 9631)
@@ -36,9 +36,38 @@
<servlet-class>org.jboss.portal.test.portlet.framework.UTS1</servlet-class>
</servlet>
+ <servlet>
+ <servlet-name>UniversalServletB</servlet-name>
+ <servlet-class>org.jboss.portal.test.portlet.framework.UTS2</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>UniversalServletC</servlet-name>
+ <servlet-class>org.jboss.portal.test.portlet.framework.UTS3</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>UniversalServletD</servlet-name>
+ <servlet-class>org.jboss.portal.test.portlet.framework.UTS4</servlet-class>
+ </servlet>
+
<servlet-mapping>
<servlet-name>UniversalServletA</servlet-name>
<url-pattern>/universalServletA/*</url-pattern>
</servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>UniversalServletB</servlet-name>
+ <url-pattern>/universalServletB/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>UniversalServletC</servlet-name>
+ <url-pattern>/universalServletC/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>UniversalServletD</servlet-name>
+ <url-pattern>/universalServletD/*</url-pattern>
+ </servlet-mapping>
</web-app>
18 years, 3 months