portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msnickl...@apache.org
Subject [48/50] [abbrv] Completed code generation for dispatcher request / response tests. Moved tests that need to be written manually into separate module - DispatcherReqRespTests5S.
Date Wed, 20 Aug 2014 06:43:01 GMT
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/368fbd4d/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletActionResponse.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletActionResponse.java b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletActionResponse.java
new file mode 100644
index 0000000..5df523e
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletActionResponse.java
@@ -0,0 +1,123 @@
+/*  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.JSR286DispatcherReqRespTestCaseDetails.*;
+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 DispatcherReqRespTests5S_SPEC2_19_ForwardServletActionResponse_event
+ *
+ */
+public class DispatcherReqRespTests5S_SPEC2_19_ForwardServletActionResponse implements Portlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherReqRespTests5S_SPEC2_19_ForwardServletActionResponse.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();
+
+      String target = SERVLET_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_ForwardServletActionResponse_servlet" + SERVLET_SUFFIX + "?" + 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 + "DispatcherReqRespTests5S_SPEC2_19_ForwardServletActionResponse", APPLICATION_SCOPE);
+      if (msg != null) {
+         writer.write("<p>" + msg + "</p><br/>\n");
+         ps.removeAttribute(RESULT_ATTR_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_ForwardServletActionResponse", APPLICATION_SCOPE);
+      }
+
+      /* TestCase: V2DispatcherReqRespTests5S_SPEC2_19_ForwardServletActionResponse_sendRedirect */
+      /* Details: "In a target servlet of a forward in the Action phase,      */
+      /* the method HttpServletResponse.sendRedirect must provide the same    */
+      /* functionality as ActionResponse.sendRedirect"                        */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherReqRespTests5S_SPEC2_19_ForwardServletActionResponse_sendRedirect", aurl);
+         tb.writeTo(writer);
+      }
+
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/368fbd4d/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletRenderRequest.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletRenderRequest.java b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletRenderRequest.java
new file mode 100644
index 0000000..296cc93
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletRenderRequest.java
@@ -0,0 +1,105 @@
+/*  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.JSR286DispatcherReqRespTestCaseDetails.*;
+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 DispatcherReqRespTests5S_SPEC2_19_ForwardServletRenderRequest_event
+ *
+ */
+public class DispatcherReqRespTests5S_SPEC2_19_ForwardServletRenderRequest implements Portlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherReqRespTests5S_SPEC2_19_ForwardServletRenderRequest.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();
+
+      String target = SERVLET_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_ForwardServletRenderRequest_servlet" + SERVLET_SUFFIX + "?" + QUERY_STRING;
+      PortletRequestDispatcher rd = portletConfig.getPortletContext()
+            .getRequestDispatcher(target);
+      rd.forward(portletReq, portletResp);
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/368fbd4d/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletRenderResponse.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletRenderResponse.java b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletRenderResponse.java
new file mode 100644
index 0000000..aa17f94
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletRenderResponse.java
@@ -0,0 +1,105 @@
+/*  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.JSR286DispatcherReqRespTestCaseDetails.*;
+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 DispatcherReqRespTests5S_SPEC2_19_ForwardServletRenderResponse_event
+ *
+ */
+public class DispatcherReqRespTests5S_SPEC2_19_ForwardServletRenderResponse implements Portlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherReqRespTests5S_SPEC2_19_ForwardServletRenderResponse.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();
+
+      String target = SERVLET_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_ForwardServletRenderResponse_servlet" + SERVLET_SUFFIX + "?" + QUERY_STRING;
+      PortletRequestDispatcher rd = portletConfig.getPortletContext()
+            .getRequestDispatcher(target);
+      rd.forward(portletReq, portletResp);
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/368fbd4d/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceRequest.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceRequest.java b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceRequest.java
new file mode 100644
index 0000000..89f3ee4
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceRequest.java
@@ -0,0 +1,120 @@
+/*  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.JSR286DispatcherReqRespTestCaseDetails.*;
+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 DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceRequest_event
+ *
+ */
+public class DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceRequest implements Portlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceRequest.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();
+
+      String target = SERVLET_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceRequest_servlet" + SERVLET_SUFFIX + "?" + 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=\"DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceRequest\">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(\"DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceRequest\").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");
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/368fbd4d/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceResponse.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceResponse.java b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceResponse.java
new file mode 100644
index 0000000..4d7e218
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceResponse.java
@@ -0,0 +1,120 @@
+/*  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.JSR286DispatcherReqRespTestCaseDetails.*;
+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 DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceResponse_event
+ *
+ */
+public class DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceResponse implements Portlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceResponse.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();
+
+      String target = SERVLET_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceResponse_servlet" + SERVLET_SUFFIX + "?" + 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=\"DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceResponse\">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(\"DispatcherReqRespTests5S_SPEC2_19_ForwardServletResourceResponse\").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");
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/368fbd4d/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPActionRequest.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPActionRequest.java b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPActionRequest.java
new file mode 100644
index 0000000..cb2cfa1
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPActionRequest.java
@@ -0,0 +1,134 @@
+/*  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.JSR286DispatcherReqRespTestCaseDetails.*;
+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 DispatcherReqRespTests5S_SPEC2_19_IncludeJSPActionRequest_event
+ *
+ */
+public class DispatcherReqRespTests5S_SPEC2_19_IncludeJSPActionRequest implements Portlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherReqRespTests5S_SPEC2_19_IncludeJSPActionRequest.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();
+
+      String target = JSP_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_IncludeJSPActionRequest" + JSP_SUFFIX + "?" + QUERY_STRING;
+      PortletRequestDispatcher rd = portletConfig.getPortletContext()
+            .getRequestDispatcher(target);
+      rd.include(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 + "DispatcherReqRespTests5S_SPEC2_19_IncludeJSPActionRequest", APPLICATION_SCOPE);
+      if (msg != null) {
+         writer.write("<p>" + msg + "</p><br/>\n");
+         ps.removeAttribute(RESULT_ATTR_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_IncludeJSPActionRequest", APPLICATION_SCOPE);
+      }
+
+      /* TestCase: V2DispatcherReqRespTests5S_SPEC2_19_IncludeJSPActionRequest_getInputStream */
+      /* Details: "In a target jsp of a include in the Action phase, the      */
+      /* method HttpServletRequest.getInputStream must provide the same       */
+      /* functionality as ActionRequest.getPortletInputStream"                */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherReqRespTests5S_SPEC2_19_IncludeJSPActionRequest_getInputStream", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherReqRespTests5S_SPEC2_19_IncludeJSPActionRequest_setCharacterEncoding */
+      /* Details: "In a target jsp of a include in the Action phase, the      */
+      /* method HttpServletRequest.setCharacterEncoding must provide the      */
+      /* same functionality as ActionRequest.setCharacterEncoding"            */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherReqRespTests5S_SPEC2_19_IncludeJSPActionRequest_setCharacterEncoding", aurl);
+         tb.writeTo(writer);
+      }
+
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/368fbd4d/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPRenderRequest.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPRenderRequest.java b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPRenderRequest.java
new file mode 100644
index 0000000..2e43b9d
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPRenderRequest.java
@@ -0,0 +1,105 @@
+/*  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.JSR286DispatcherReqRespTestCaseDetails.*;
+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 DispatcherReqRespTests5S_SPEC2_19_IncludeJSPRenderRequest_event
+ *
+ */
+public class DispatcherReqRespTests5S_SPEC2_19_IncludeJSPRenderRequest implements Portlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherReqRespTests5S_SPEC2_19_IncludeJSPRenderRequest.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();
+
+      String target = JSP_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_IncludeJSPRenderRequest" + JSP_SUFFIX + "?" + QUERY_STRING;
+      PortletRequestDispatcher rd = portletConfig.getPortletContext()
+            .getRequestDispatcher(target);
+      rd.include(portletReq, portletResp);
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/368fbd4d/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPRenderResponse.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPRenderResponse.java b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPRenderResponse.java
new file mode 100644
index 0000000..78484fb
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPRenderResponse.java
@@ -0,0 +1,105 @@
+/*  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.JSR286DispatcherReqRespTestCaseDetails.*;
+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 DispatcherReqRespTests5S_SPEC2_19_IncludeJSPRenderResponse_event
+ *
+ */
+public class DispatcherReqRespTests5S_SPEC2_19_IncludeJSPRenderResponse implements Portlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherReqRespTests5S_SPEC2_19_IncludeJSPRenderResponse.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();
+
+      String target = JSP_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_IncludeJSPRenderResponse" + JSP_SUFFIX + "?" + QUERY_STRING;
+      PortletRequestDispatcher rd = portletConfig.getPortletContext()
+            .getRequestDispatcher(target);
+      rd.include(portletReq, portletResp);
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/368fbd4d/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceRequest.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceRequest.java b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceRequest.java
new file mode 100644
index 0000000..42178dd
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceRequest.java
@@ -0,0 +1,120 @@
+/*  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.JSR286DispatcherReqRespTestCaseDetails.*;
+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 DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceRequest_event
+ *
+ */
+public class DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceRequest implements Portlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceRequest.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();
+
+      String target = JSP_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceRequest" + JSP_SUFFIX + "?" + QUERY_STRING;
+      PortletRequestDispatcher rd = portletConfig.getPortletContext()
+            .getRequestDispatcher(target);
+      rd.include(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=\"DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceRequest\">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(\"DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceRequest\").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");
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/368fbd4d/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceResponse.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceResponse.java b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceResponse.java
new file mode 100644
index 0000000..d43908f
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceResponse.java
@@ -0,0 +1,120 @@
+/*  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.JSR286DispatcherReqRespTestCaseDetails.*;
+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 DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceResponse_event
+ *
+ */
+public class DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceResponse implements Portlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceResponse.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();
+
+      String target = JSP_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceResponse" + JSP_SUFFIX + "?" + QUERY_STRING;
+      PortletRequestDispatcher rd = portletConfig.getPortletContext()
+            .getRequestDispatcher(target);
+      rd.include(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=\"DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceResponse\">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(\"DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceResponse\").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");
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/368fbd4d/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletActionRequest.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletActionRequest.java b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletActionRequest.java
new file mode 100644
index 0000000..bd3f63a
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletActionRequest.java
@@ -0,0 +1,134 @@
+/*  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.JSR286DispatcherReqRespTestCaseDetails.*;
+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 DispatcherReqRespTests5S_SPEC2_19_IncludeServletActionRequest_event
+ *
+ */
+public class DispatcherReqRespTests5S_SPEC2_19_IncludeServletActionRequest implements Portlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherReqRespTests5S_SPEC2_19_IncludeServletActionRequest.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();
+
+      String target = SERVLET_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_IncludeServletActionRequest_servlet" + SERVLET_SUFFIX + "?" + QUERY_STRING;
+      PortletRequestDispatcher rd = portletConfig.getPortletContext()
+            .getRequestDispatcher(target);
+      rd.include(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 + "DispatcherReqRespTests5S_SPEC2_19_IncludeServletActionRequest", APPLICATION_SCOPE);
+      if (msg != null) {
+         writer.write("<p>" + msg + "</p><br/>\n");
+         ps.removeAttribute(RESULT_ATTR_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_IncludeServletActionRequest", APPLICATION_SCOPE);
+      }
+
+      /* TestCase: V2DispatcherReqRespTests5S_SPEC2_19_IncludeServletActionRequest_getInputStream */
+      /* Details: "In a target servlet of a include in the Action phase,      */
+      /* the method HttpServletRequest.getInputStream must provide the same   */
+      /* functionality as ActionRequest.getPortletInputStream"                */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherReqRespTests5S_SPEC2_19_IncludeServletActionRequest_getInputStream", aurl);
+         tb.writeTo(writer);
+      }
+
+      /* TestCase: V2DispatcherReqRespTests5S_SPEC2_19_IncludeServletActionRequest_setCharacterEncoding */
+      /* Details: "In a target servlet of a include in the Action phase,      */
+      /* the method HttpServletRequest.setCharacterEncoding must provide      */
+      /* the same functionality as ActionRequest.setCharacterEncoding"        */
+      {
+         PortletURL aurl = portletResp.createActionURL();
+         aurl.setParameters(portletReq.getPrivateParameterMap());
+         TestButton tb = new TestButton("V2DispatcherReqRespTests5S_SPEC2_19_IncludeServletActionRequest_setCharacterEncoding", aurl);
+         tb.writeTo(writer);
+      }
+
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/368fbd4d/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletRenderRequest.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletRenderRequest.java b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletRenderRequest.java
new file mode 100644
index 0000000..93f1459
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletRenderRequest.java
@@ -0,0 +1,105 @@
+/*  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.JSR286DispatcherReqRespTestCaseDetails.*;
+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 DispatcherReqRespTests5S_SPEC2_19_IncludeServletRenderRequest_event
+ *
+ */
+public class DispatcherReqRespTests5S_SPEC2_19_IncludeServletRenderRequest implements Portlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherReqRespTests5S_SPEC2_19_IncludeServletRenderRequest.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();
+
+      String target = SERVLET_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_IncludeServletRenderRequest_servlet" + SERVLET_SUFFIX + "?" + QUERY_STRING;
+      PortletRequestDispatcher rd = portletConfig.getPortletContext()
+            .getRequestDispatcher(target);
+      rd.include(portletReq, portletResp);
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/368fbd4d/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletRenderResponse.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletRenderResponse.java b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletRenderResponse.java
new file mode 100644
index 0000000..85ef9ff
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletRenderResponse.java
@@ -0,0 +1,105 @@
+/*  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.JSR286DispatcherReqRespTestCaseDetails.*;
+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 DispatcherReqRespTests5S_SPEC2_19_IncludeServletRenderResponse_event
+ *
+ */
+public class DispatcherReqRespTests5S_SPEC2_19_IncludeServletRenderResponse implements Portlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherReqRespTests5S_SPEC2_19_IncludeServletRenderResponse.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();
+
+      String target = SERVLET_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_IncludeServletRenderResponse_servlet" + SERVLET_SUFFIX + "?" + QUERY_STRING;
+      PortletRequestDispatcher rd = portletConfig.getPortletContext()
+            .getRequestDispatcher(target);
+      rd.include(portletReq, portletResp);
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/368fbd4d/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceRequest.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceRequest.java b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceRequest.java
new file mode 100644
index 0000000..2cc225b
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceRequest.java
@@ -0,0 +1,120 @@
+/*  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.JSR286DispatcherReqRespTestCaseDetails.*;
+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 DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceRequest_event
+ *
+ */
+public class DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceRequest implements Portlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceRequest.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();
+
+      String target = SERVLET_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceRequest_servlet" + SERVLET_SUFFIX + "?" + QUERY_STRING;
+      PortletRequestDispatcher rd = portletConfig.getPortletContext()
+            .getRequestDispatcher(target);
+      rd.include(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=\"DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceRequest\">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(\"DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceRequest\").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");
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/368fbd4d/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceResponse.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceResponse.java b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceResponse.java
new file mode 100644
index 0000000..87cd091
--- /dev/null
+++ b/portlet-tck_3.0/V2DispatcherReqRespTests5S/src/main/java/javax/portlet/tck/portlets/DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceResponse.java
@@ -0,0 +1,120 @@
+/*  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.JSR286DispatcherReqRespTestCaseDetails.*;
+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 DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceResponse_event
+ *
+ */
+public class DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceResponse implements Portlet, ResourceServingPortlet {
+   private static final String LOG_CLASS = 
+         DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceResponse.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();
+
+      String target = SERVLET_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceResponse_servlet" + SERVLET_SUFFIX + "?" + QUERY_STRING;
+      PortletRequestDispatcher rd = portletConfig.getPortletContext()
+            .getRequestDispatcher(target);
+      rd.include(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=\"DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceResponse\">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(\"DispatcherReqRespTests5S_SPEC2_19_IncludeServletResourceResponse\").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