portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msnickl...@apache.org
Subject [25/35] Added new dispatcher tests:
Date Fri, 22 Aug 2014 13:14:03 GMT
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/2a619ecc/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletAction.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletAction.java b/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletAction.java
new file mode 100644
index 0000000..eae5fb4
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletAction.java
@@ -0,0 +1,461 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package javax.portlet.tck.portlets;
+
+import java.io.*;
+import java.util.*;
+import java.util.logging.*;
+import static java.util.logging.Logger.*;
+import javax.xml.namespace.QName;
+import javax.portlet.*;
+import javax.portlet.filter.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.portlet.tck.beans.*;
+import javax.portlet.tck.constants.*;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.*;
+import static javax.portlet.tck.constants.Constants.*;
+import static javax.portlet.PortletSession.*;
+import static javax.portlet.ResourceURL.*;
+
+/**
+ * This portlet implements several test cases for the JSR 362 TCK. The test case names
+ * are defined in the /src/main/resources/xml-resources/additionalTCs.xml
+ * file. The build process will integrate the test case names defined in the 
+ * additionalTCs.xml file into the complete list of test case names for execution by the driver.
+ *
+ * This is the main portlet for the test cases. If the test cases call for events, this portlet
+ * will initiate the events, but not process them. The processing is done in the companion 
+ * portlet DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_event
+ *
+ */
+public class DispatcherTests6_SPEC2_19_FwdThenForwardServletAction implements Portlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherTests6_SPEC2_19_FwdThenForwardServletAction.class.getName();
+   private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
+   
+   private PortletConfig portletConfig = null;
+
+   @Override
+   public void init(PortletConfig config) throws PortletException {
+      this.portletConfig = config;
+   }
+
+   @Override
+   public void destroy() {
+   }
+
+   @Override
+   public void processAction(ActionRequest portletReq, ActionResponse portletResp)
+         throws PortletException, IOException {
+      LOGGER.entering(LOG_CLASS, "main portlet processAction entry");
+
+      portletResp.setRenderParameters(portletReq.getParameterMap());
+      long tid = Thread.currentThread().getId();
+      portletReq.setAttribute(THREADID_ATTR, tid);
+
+      StringWriter writer = new StringWriter();
+
+      // Multilevel forward / include
+      portletReq.setAttribute(ATTR_DISPATCH_ACTION, "forward");
+      String targ = SERVLET_PREFIX + "DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_servlet" + SERVLET_SUFFIX + "?" + QUERY_STRING;
+      portletReq.setAttribute(ATTR_DISPATCH_TARGET, targ);
+
+      // Now do the actual dispatch
+      String target = "/IncluderForwarderServlet" + "?" + QUERY_STRING;
+      PortletRequestDispatcher rd = portletConfig.getPortletContext()
+            .getRequestDispatcher(target);
+      rd.forward(portletReq, portletResp);
+   }
+
+   @Override
+   public void serveResource(ResourceRequest portletReq, ResourceResponse portletResp)
+         throws PortletException, IOException {
+      LOGGER.entering(LOG_CLASS, "main portlet serveResource entry");
+
+      long tid = Thread.currentThread().getId();
+      portletReq.setAttribute(THREADID_ATTR, tid);
+
+      PrintWriter writer = portletResp.getWriter();
+
+   }
+
+   @Override
+   public void render(RenderRequest portletReq, RenderResponse portletResp)
+         throws PortletException, IOException {
+      LOGGER.entering(LOG_CLASS, "main portlet render entry");
+
+      long tid = Thread.currentThread().getId();
+      portletReq.setAttribute(THREADID_ATTR, tid);
+
+      PrintWriter writer = portletResp.getWriter();
+
+      PortletSession ps = portletReq.getPortletSession();
+      String msg = (String) ps.getAttribute(RESULT_ATTR_PREFIX + "DispatcherTests6_SPEC2_19_FwdThenForwardServletAction", APPLICATION_SCOPE);
+      if (msg != null) {
+         writer.write("<p>" + msg + "</p><br/>\n");
+         ps.removeAttribute(RESULT_ATTR_PREFIX + "DispatcherTests6_SPEC2_19_FwdThenForwardServletAction", APPLICATION_SCOPE);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_dispatch1 */
+      /* Details: "In a servlet forwarded to by the target of a forward, if   */
+      /* the path provided to getRequestDispatcher method contains query      */
+      /* strings, parameters specified in the query strings must be passed    */
+      /* to the target servlet during an forward"                             */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_dispatch1", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_dispatch2 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* parameters specified in the query strings must be aggregated with    */
+      /* the portlet render parameters"                                       */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_dispatch2", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_dispatch3 */
+      /* Details: "In a servlet forwarded to by the target of a forward, if   */
+      /* query string parameters have the same names as render parameter      */
+      /* names, the query string parameters appear in the parameter values    */
+      /* array before the render parameter values"                            */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_dispatch3", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_invoke2 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* parameters to the forward method for a target servlet can be the     */
+      /* request and response classes from the portlet lifecyle method        */
+      /* initiating the include"                                              */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_invoke2", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_invoke4 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet container must invoke the target servlet in the same     */
+      /* thread as the PortletRequestDispatcher include invocation"           */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_invoke4", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_invoke7 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the path elements of the request object exposed to the target        */
+      /* servlet must reflect the path used to obtain the                     */
+      /* RequestDispatcher"                                                   */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_invoke7", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes1 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.forward.request_uri      */
+      /* will be set, and equals the value from                               */
+      /* HTTPServletRequest.getRequestURI for the first servlet in the        */
+      /* forward chain"                                                       */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes1", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes1a */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.forward.request_uri      */
+      /* will be set, and equals the value from                               */
+      /* HTTPServletRequest.getRequestURI for the first servlet in the        */
+      /* forward chain"                                                       */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes1a", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes1b */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.include.request_uri      */
+      /* will not be set"                                                     */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes1b", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes1c */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.include.request_uri      */
+      /* will not be set"                                                     */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes1c", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes2 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.forward.context_path     */
+      /* will be set, and equals the value from                               */
+      /* HTTPServletRequest.getContextPath for the first servlet in the       */
+      /* forward chain"                                                       */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes2", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes2a */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.forward.context_path     */
+      /* will be set, and equals the value from                               */
+      /* HTTPServletRequest.getContextPath for the first servlet in the       */
+      /* forward chain"                                                       */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes2a", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes2b */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.include.context_path     */
+      /* will not be set"                                                     */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes2b", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes2c */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.include.context_path     */
+      /* will not be set"                                                     */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes2c", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes3 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.forward.servlet_path     */
+      /* will be set, and equals the value from                               */
+      /* HTTPServletRequest.getServletPath for the first servlet in the       */
+      /* forward chain"                                                       */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes3", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes3a */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.forward.servlet_path     */
+      /* will be set, and equals the value from                               */
+      /* HTTPServletRequest.getServletPath for the first servlet in the       */
+      /* forward chain"                                                       */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes3a", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes3b */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.include.servlet_path     */
+      /* will not be set"                                                     */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes3b", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes3c */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.include.servlet_path     */
+      /* will not be set"                                                     */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes3c", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes4 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.forward.path_info will   */
+      /* be set, and equals the value from HTTPServletRequest.getPathInfo     */
+      /* for the first servlet in the forward chain"                          */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes4", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes4a */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.forward.path_info will   */
+      /* be set, and equals the value from HTTPServletRequest.getPathInfo     */
+      /* for the first servlet in the forward chain"                          */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes4a", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes4b */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.include.path_info will   */
+      /* not be set"                                                          */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes4b", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes4c */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.include.path_info will   */
+      /* not be set"                                                          */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes4c", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes5 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.forward.query_string     */
+      /* will be set, and equals the value from                               */
+      /* HTTPServletRequest.getQueryString for the first servlet in the       */
+      /* forward chain"                                                       */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes5", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes5a */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.forward.query_string     */
+      /* will be set, and equals the value from                               */
+      /* HTTPServletRequest.getQueryString for the first servlet in the       */
+      /* forward chain"                                                       */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes5a", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes5b */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.include.query_string     */
+      /* will not be set"                                                     */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes5b", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes5c */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.include.query_string     */
+      /* will not be set"                                                     */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes5c", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes6 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the request attribute javax.portlet.config must be set to the        */
+      /* javax.portlet.PortletConfig object"                                  */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes6", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes7 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* for forwards from the processAction method, The request attribute    */
+      /* javax.portlet.request must be set to the                             */
+      /* javax.portlet.ActionRequest object"                                  */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes7", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes8 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* for forwards from the processAction method, The request attribute    */
+      /* javax.portlet.response must be set to the                            */
+      /* javax.portlet.ActionResponse object"                                 */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletAction_attributes8", aurl);
+         tb.writeTo(writer);
+      }
+
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/2a619ecc/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent.java b/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent.java
new file mode 100644
index 0000000..c714c60
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent.java
@@ -0,0 +1,447 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package javax.portlet.tck.portlets;
+
+import java.io.*;
+import java.util.*;
+import java.util.logging.*;
+import static java.util.logging.Logger.*;
+import javax.xml.namespace.QName;
+import javax.portlet.*;
+import javax.portlet.filter.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.portlet.tck.beans.*;
+import javax.portlet.tck.constants.*;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.*;
+import static javax.portlet.tck.constants.Constants.*;
+import static javax.portlet.PortletSession.*;
+import static javax.portlet.ResourceURL.*;
+
+/**
+ * This portlet implements several test cases for the JSR 362 TCK. The test case names
+ * are defined in the /src/main/resources/xml-resources/additionalTCs.xml
+ * file. The build process will integrate the test case names defined in the 
+ * additionalTCs.xml file into the complete list of test case names for execution by the driver.
+ *
+ * This is the main portlet for the test cases. If the test cases call for events, this portlet
+ * will initiate the events, but not process them. The processing is done in the companion 
+ * portlet DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_event
+ *
+ */
+public class DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent implements Portlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent.class.getName();
+   private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
+   
+   private PortletConfig portletConfig = null;
+
+   @Override
+   public void init(PortletConfig config) throws PortletException {
+      this.portletConfig = config;
+   }
+
+   @Override
+   public void destroy() {
+   }
+
+   @Override
+   public void processAction(ActionRequest portletReq, ActionResponse portletResp)
+         throws PortletException, IOException {
+      LOGGER.entering(LOG_CLASS, "main portlet processAction entry");
+
+      portletResp.setRenderParameters(portletReq.getParameterMap());
+      long tid = Thread.currentThread().getId();
+      portletReq.setAttribute(THREADID_ATTR, tid);
+
+      StringWriter writer = new StringWriter();
+
+      QName eventQName = new QName(TCKNAMESPACE,
+             "DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent");
+      portletResp.setEvent(eventQName, "Hi!");
+   }
+
+   @Override
+   public void serveResource(ResourceRequest portletReq, ResourceResponse portletResp)
+         throws PortletException, IOException {
+      LOGGER.entering(LOG_CLASS, "main portlet serveResource entry");
+
+      long tid = Thread.currentThread().getId();
+      portletReq.setAttribute(THREADID_ATTR, tid);
+
+      PrintWriter writer = portletResp.getWriter();
+
+   }
+
+   @Override
+   public void render(RenderRequest portletReq, RenderResponse portletResp)
+         throws PortletException, IOException {
+      LOGGER.entering(LOG_CLASS, "main portlet render entry");
+
+      long tid = Thread.currentThread().getId();
+      portletReq.setAttribute(THREADID_ATTR, tid);
+
+      PrintWriter writer = portletResp.getWriter();
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_dispatch1 */
+      /* Details: "In a servlet forwarded to by the target of a forward, if   */
+      /* the path provided to getRequestDispatcher method contains query      */
+      /* strings, parameters specified in the query strings must be passed    */
+      /* to the target servlet during an forward"                             */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_dispatch1", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_dispatch2 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* parameters specified in the query strings must be aggregated with    */
+      /* the portlet render parameters"                                       */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_dispatch2", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_dispatch3 */
+      /* Details: "In a servlet forwarded to by the target of a forward, if   */
+      /* query string parameters have the same names as render parameter      */
+      /* names, the query string parameters appear in the parameter values    */
+      /* array before the render parameter values"                            */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_dispatch3", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_invoke2 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* parameters to the forward method for a target servlet can be the     */
+      /* request and response classes from the portlet lifecyle method        */
+      /* initiating the include"                                              */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_invoke2", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_invoke4 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet container must invoke the target servlet in the same     */
+      /* thread as the PortletRequestDispatcher include invocation"           */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_invoke4", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_invoke7 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the path elements of the request object exposed to the target        */
+      /* servlet must reflect the path used to obtain the                     */
+      /* RequestDispatcher"                                                   */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_invoke7", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes1 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.forward.request_uri      */
+      /* will be set, and equals the value from                               */
+      /* HTTPServletRequest.getRequestURI for the first servlet in the        */
+      /* forward chain"                                                       */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes1", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes1a */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.forward.request_uri      */
+      /* will be set, and equals the value from                               */
+      /* HTTPServletRequest.getRequestURI for the first servlet in the        */
+      /* forward chain"                                                       */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes1a", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes1b */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.include.request_uri      */
+      /* will not be set"                                                     */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes1b", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes1c */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.include.request_uri      */
+      /* will not be set"                                                     */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes1c", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes2 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.forward.context_path     */
+      /* will be set, and equals the value from                               */
+      /* HTTPServletRequest.getContextPath for the first servlet in the       */
+      /* forward chain"                                                       */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes2", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes2a */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.forward.context_path     */
+      /* will be set, and equals the value from                               */
+      /* HTTPServletRequest.getContextPath for the first servlet in the       */
+      /* forward chain"                                                       */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes2a", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes2b */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.include.context_path     */
+      /* will not be set"                                                     */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes2b", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes2c */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.include.context_path     */
+      /* will not be set"                                                     */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes2c", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes3 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.forward.servlet_path     */
+      /* will be set, and equals the value from                               */
+      /* HTTPServletRequest.getServletPath for the first servlet in the       */
+      /* forward chain"                                                       */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes3", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes3a */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.forward.servlet_path     */
+      /* will be set, and equals the value from                               */
+      /* HTTPServletRequest.getServletPath for the first servlet in the       */
+      /* forward chain"                                                       */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes3a", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes3b */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.include.servlet_path     */
+      /* will not be set"                                                     */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes3b", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes3c */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.include.servlet_path     */
+      /* will not be set"                                                     */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes3c", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes4 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.forward.path_info will   */
+      /* be set, and equals the value from HTTPServletRequest.getPathInfo     */
+      /* for the first servlet in the forward chain"                          */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes4", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes4a */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.forward.path_info will   */
+      /* be set, and equals the value from HTTPServletRequest.getPathInfo     */
+      /* for the first servlet in the forward chain"                          */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes4a", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes4b */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.include.path_info will   */
+      /* not be set"                                                          */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes4b", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes4c */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.include.path_info will   */
+      /* not be set"                                                          */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes4c", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes5 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.forward.query_string     */
+      /* will be set, and equals the value from                               */
+      /* HTTPServletRequest.getQueryString for the first servlet in the       */
+      /* forward chain"                                                       */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes5", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes5a */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.forward.query_string     */
+      /* will be set, and equals the value from                               */
+      /* HTTPServletRequest.getQueryString for the first servlet in the       */
+      /* forward chain"                                                       */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes5a", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes5b */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the portlet request attribute javax.servlet.include.query_string     */
+      /* will not be set"                                                     */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes5b", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes5c */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the servlet request attribute javax.servlet.include.query_string     */
+      /* will not be set"                                                     */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes5c", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes6 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* the request attribute javax.portlet.config must be set to the        */
+      /* javax.portlet.PortletConfig object"                                  */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes6", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes7 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* for forwards from the processEvent method, The request attribute     */
+      /* javax.portlet.request must be set to the                             */
+      /* javax.portlet.EventRequest object"                                   */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes7", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes8 */
+      /* Details: "In a servlet forwarded to by the target of a forward,      */
+      /* for forwards from the processEvent method, The request attribute     */
+      /* javax.portlet.response must be set to the                            */
+      /* javax.portlet.EventResponse object"                                  */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_attributes8", aurl);
+         tb.writeTo(writer);
+      }
+
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/2a619ecc/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_event.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_event.java b/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_event.java
new file mode 100644
index 0000000..542782d
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_event.java
@@ -0,0 +1,112 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package javax.portlet.tck.portlets;
+
+import java.io.*;
+import java.util.*;
+import java.util.logging.*;
+import static java.util.logging.Logger.*;
+import javax.xml.namespace.QName;
+import javax.portlet.*;
+import javax.portlet.filter.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.portlet.tck.beans.*;
+import javax.portlet.tck.constants.*;
+import static javax.portlet.tck.constants.Constants.*;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.*;
+import static javax.portlet.PortletSession.*;
+
+/**
+ * This is the event processing portlet for the test cases. This portlet processes events, 
+ * but does not publish them. Events are published in the main portlet for the test cases. 
+ */
+public class DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_event implements Portlet, EventPortlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_event.class.getName();
+   private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
+   
+   private PortletConfig portletConfig = null;
+
+   @Override
+   public void init(PortletConfig config) throws PortletException {
+      this.portletConfig = config;
+   }
+
+   @Override
+   public void destroy() {
+   }
+
+   @Override
+   public void processAction(ActionRequest portletReq, ActionResponse portletResp)
+         throws PortletException, IOException {
+      LOGGER.entering(LOG_CLASS, "event companion processAction - ERROR!!");
+   }
+
+   @Override
+   public void serveResource(ResourceRequest portletReq, ResourceResponse portletResp)
+         throws PortletException, IOException {
+      LOGGER.entering(LOG_CLASS, "event companion serveResource - ERROR!!");
+   }
+
+   @Override
+   public void processEvent(EventRequest portletReq, EventResponse portletResp)
+         throws PortletException, IOException {
+      LOGGER.entering(LOG_CLASS, "event companion processEvent");
+
+
+      portletResp.setRenderParameters(portletReq);
+
+      long tid = Thread.currentThread().getId();
+      portletReq.setAttribute(THREADID_ATTR, tid);
+
+      StringWriter writer = new StringWriter();
+
+      // Multilevel forward / include
+      portletReq.setAttribute(ATTR_DISPATCH_ACTION, "forward");
+      String targ = SERVLET_PREFIX + "DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_servlet" + SERVLET_SUFFIX + "?" + QUERY_STRING;
+      portletReq.setAttribute(ATTR_DISPATCH_TARGET, targ);
+
+      // Now do the actual dispatch
+      String target = "/IncluderForwarderServlet" + "?" + QUERY_STRING;
+      PortletRequestDispatcher rd = portletConfig.getPortletContext()
+            .getRequestDispatcher(target);
+      rd.forward(portletReq, portletResp);
+
+   }
+
+   @Override
+   public void render(RenderRequest portletReq, RenderResponse portletResp)
+         throws PortletException, IOException {
+      
+      LOGGER.entering(LOG_CLASS, "event companion render");
+
+      portletResp.setContentType("text/html");
+      PrintWriter writer = portletResp.getWriter();
+      writer.write("<h3>Event Companion Portlet </h3>\n");
+      writer.write("<p>DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent_event</p>\n");
+
+      String msg = (String) portletReq.getPortletSession()
+            .getAttribute(RESULT_ATTR_PREFIX + "DispatcherTests6_SPEC2_19_FwdThenForwardServletEvent", APPLICATION_SCOPE);
+      msg = (msg==null) ? "Not ready. click test case link." : msg;
+      writer.write("<p>" + msg + "</p>\n");
+
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/2a619ecc/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletRender.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletRender.java b/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletRender.java
new file mode 100644
index 0000000..143d0d1
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletRender.java
@@ -0,0 +1,111 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package javax.portlet.tck.portlets;
+
+import java.io.*;
+import java.util.*;
+import java.util.logging.*;
+import static java.util.logging.Logger.*;
+import javax.xml.namespace.QName;
+import javax.portlet.*;
+import javax.portlet.filter.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.portlet.tck.beans.*;
+import javax.portlet.tck.constants.*;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.*;
+import static javax.portlet.tck.constants.Constants.*;
+import static javax.portlet.PortletSession.*;
+import static javax.portlet.ResourceURL.*;
+
+/**
+ * This portlet implements several test cases for the JSR 362 TCK. The test case names
+ * are defined in the /src/main/resources/xml-resources/additionalTCs.xml
+ * file. The build process will integrate the test case names defined in the 
+ * additionalTCs.xml file into the complete list of test case names for execution by the driver.
+ *
+ * This is the main portlet for the test cases. If the test cases call for events, this portlet
+ * will initiate the events, but not process them. The processing is done in the companion 
+ * portlet DispatcherTests6_SPEC2_19_FwdThenForwardServletRender_event
+ *
+ */
+public class DispatcherTests6_SPEC2_19_FwdThenForwardServletRender implements Portlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherTests6_SPEC2_19_FwdThenForwardServletRender.class.getName();
+   private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
+   
+   private PortletConfig portletConfig = null;
+
+   @Override
+   public void init(PortletConfig config) throws PortletException {
+      this.portletConfig = config;
+   }
+
+   @Override
+   public void destroy() {
+   }
+
+   @Override
+   public void processAction(ActionRequest portletReq, ActionResponse portletResp)
+         throws PortletException, IOException {
+      LOGGER.entering(LOG_CLASS, "main portlet processAction entry");
+
+      portletResp.setRenderParameters(portletReq.getParameterMap());
+      long tid = Thread.currentThread().getId();
+      portletReq.setAttribute(THREADID_ATTR, tid);
+
+      StringWriter writer = new StringWriter();
+
+   }
+
+   @Override
+   public void serveResource(ResourceRequest portletReq, ResourceResponse portletResp)
+         throws PortletException, IOException {
+      LOGGER.entering(LOG_CLASS, "main portlet serveResource entry");
+
+      long tid = Thread.currentThread().getId();
+      portletReq.setAttribute(THREADID_ATTR, tid);
+
+      PrintWriter writer = portletResp.getWriter();
+
+   }
+
+   @Override
+   public void render(RenderRequest portletReq, RenderResponse portletResp)
+         throws PortletException, IOException {
+      LOGGER.entering(LOG_CLASS, "main portlet render entry");
+
+      long tid = Thread.currentThread().getId();
+      portletReq.setAttribute(THREADID_ATTR, tid);
+
+      PrintWriter writer = portletResp.getWriter();
+
+      // Multilevel forward / include
+      portletReq.setAttribute(ATTR_DISPATCH_ACTION, "forward");
+      String targ = SERVLET_PREFIX + "DispatcherTests6_SPEC2_19_FwdThenForwardServletRender_servlet" + SERVLET_SUFFIX + "?" + QUERY_STRING;
+      portletReq.setAttribute(ATTR_DISPATCH_TARGET, targ);
+
+      // Now do the actual dispatch
+      String target = "/IncluderForwarderServlet" + "?" + QUERY_STRING;
+      PortletRequestDispatcher rd = portletConfig.getPortletContext()
+            .getRequestDispatcher(target);
+      rd.forward(portletReq, portletResp);
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/2a619ecc/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletResource.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletResource.java b/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletResource.java
new file mode 100644
index 0000000..51b55e4
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherTests6/src/main/java/javax/portlet/tck/portlets/DispatcherTests6_SPEC2_19_FwdThenForwardServletResource.java
@@ -0,0 +1,126 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package javax.portlet.tck.portlets;
+
+import java.io.*;
+import java.util.*;
+import java.util.logging.*;
+import static java.util.logging.Logger.*;
+import javax.xml.namespace.QName;
+import javax.portlet.*;
+import javax.portlet.filter.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.portlet.tck.beans.*;
+import javax.portlet.tck.constants.*;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.*;
+import static javax.portlet.tck.constants.Constants.*;
+import static javax.portlet.PortletSession.*;
+import static javax.portlet.ResourceURL.*;
+
+/**
+ * This portlet implements several test cases for the JSR 362 TCK. The test case names
+ * are defined in the /src/main/resources/xml-resources/additionalTCs.xml
+ * file. The build process will integrate the test case names defined in the 
+ * additionalTCs.xml file into the complete list of test case names for execution by the driver.
+ *
+ * This is the main portlet for the test cases. If the test cases call for events, this portlet
+ * will initiate the events, but not process them. The processing is done in the companion 
+ * portlet DispatcherTests6_SPEC2_19_FwdThenForwardServletResource_event
+ *
+ */
+public class DispatcherTests6_SPEC2_19_FwdThenForwardServletResource implements Portlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherTests6_SPEC2_19_FwdThenForwardServletResource.class.getName();
+   private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
+   
+   private PortletConfig portletConfig = null;
+
+   @Override
+   public void init(PortletConfig config) throws PortletException {
+      this.portletConfig = config;
+   }
+
+   @Override
+   public void destroy() {
+   }
+
+   @Override
+   public void processAction(ActionRequest portletReq, ActionResponse portletResp)
+         throws PortletException, IOException {
+      LOGGER.entering(LOG_CLASS, "main portlet processAction entry");
+
+      portletResp.setRenderParameters(portletReq.getParameterMap());
+      long tid = Thread.currentThread().getId();
+      portletReq.setAttribute(THREADID_ATTR, tid);
+
+      StringWriter writer = new StringWriter();
+
+   }
+
+   @Override
+   public void serveResource(ResourceRequest portletReq, ResourceResponse portletResp)
+         throws PortletException, IOException {
+      LOGGER.entering(LOG_CLASS, "main portlet serveResource entry");
+
+      long tid = Thread.currentThread().getId();
+      portletReq.setAttribute(THREADID_ATTR, tid);
+
+      PrintWriter writer = portletResp.getWriter();
+
+      // Multilevel forward / include
+      portletReq.setAttribute(ATTR_DISPATCH_ACTION, "forward");
+      String targ = SERVLET_PREFIX + "DispatcherTests6_SPEC2_19_FwdThenForwardServletResource_servlet" + SERVLET_SUFFIX + "?" + QUERY_STRING;
+      portletReq.setAttribute(ATTR_DISPATCH_TARGET, targ);
+
+      // Now do the actual dispatch
+      String target = "/IncluderForwarderServlet" + "?" + QUERY_STRING;
+      PortletRequestDispatcher rd = portletConfig.getPortletContext()
+            .getRequestDispatcher(target);
+      rd.forward(portletReq, portletResp);
+   }
+
+   @Override
+   public void render(RenderRequest portletReq, RenderResponse portletResp)
+         throws PortletException, IOException {
+      LOGGER.entering(LOG_CLASS, "main portlet render entry");
+
+      long tid = Thread.currentThread().getId();
+      portletReq.setAttribute(THREADID_ATTR, tid);
+
+      PrintWriter writer = portletResp.getWriter();
+
+      writer.write("<div id=\"DispatcherTests6_SPEC2_19_FwdThenForwardServletResource\">no resource output.</div>\n");
+      ResourceURL resurl = portletResp.createResourceURL();
+      resurl.setCacheability(PAGE);
+      writer.write("<script>\n");
+      writer.write("(function () {\n");
+      writer.write("   var xhr = new XMLHttpRequest();\n");
+      writer.write("   xhr.onreadystatechange=function() {\n");
+      writer.write("      if (xhr.readyState==4 && xhr.status==200) {\n");
+      writer.write("         document.getElementById(\"DispatcherTests6_SPEC2_19_FwdThenForwardServletResource\").innerHTML=xhr.responseText;\n");
+      writer.write("      }\n");
+      writer.write("   };\n");
+      writer.write("   xhr.open(\"GET\",\"" + resurl.toString() + "\",true);\n");
+      writer.write("   xhr.send();\n");
+      writer.write("})();\n");
+      writer.write("</script>\n");
+   }
+
+}


Mime
View raw message