portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msnickl...@apache.org
Subject [11/37] portals-pluto git commit: Fixed bug in tag library where exception thrown by setSecure was not caught. Improved logging in configuration and event handling code.
Date Tue, 14 Jun 2016 15:54:09 GMT
Fixed bug in tag library where exception thrown by setSecure was not caught.
Improved logging in configuration and event handling code.

Completed and fixed tests in module V2DispatcherTests. Made attribute tests
less stringent by limiting the javax.servlet.* attribute tests to only
testing those conditions that are directly specified by the portlet spec.


Project: http://git-wip-us.apache.org/repos/asf/portals-pluto/repo
Commit: http://git-wip-us.apache.org/repos/asf/portals-pluto/commit/c4d0579e
Tree: http://git-wip-us.apache.org/repos/asf/portals-pluto/tree/c4d0579e
Diff: http://git-wip-us.apache.org/repos/asf/portals-pluto/diff/c4d0579e

Branch: refs/heads/master
Commit: c4d0579e7959466ac91fdb7830cc09c02ecddf04
Parents: f5da921
Author: Scott Nicklous <msnicklous@apache.org>
Authored: Tue Jun 14 10:04:36 2016 +0200
Committer: Scott Nicklous <msnicklous@apache.org>
Committed: Tue Jun 14 10:04:36 2016 +0200

----------------------------------------------------------------------
 .../container/impl/StateAwareResponseImpl.java  |   8 +
 .../om/portlet/impl/ConfigurationProcessor.java |  10 +
 .../services/container/EventProviderImpl.java   | 232 ++++----
 .../PortletStateAwareResponseContextImpl.java   |   4 +-
 .../java/org/apache/pluto/tags/BaseURLTag.java  |   5 +-
 ...herTests_SPEC2_19_DispatchServletAction.java |  59 +-
 ...cherTests_SPEC2_19_DispatchServletEvent.java |  52 +-
 ...sts_SPEC2_19_DispatchServletEvent_event.java |  66 ++-
 ...herTests_SPEC2_19_DispatchServletRender.java | 177 +++---
 ...rTests_SPEC2_19_DispatchServletResource.java | 175 +++---
 ...cherTests_SPEC2_19_ForwardServletAction.java | 318 +++++------
 ...tcherTests_SPEC2_19_ForwardServletEvent.java | 308 +++++-----
 ...ests_SPEC2_19_ForwardServletEvent_event.java |  98 ++--
 ...cherTests_SPEC2_19_ForwardServletRender.java |  81 ++-
 ...erTests_SPEC2_19_ForwardServletResource.java |  82 ++-
 ...cherTests_SPEC2_19_IncludeServletAction.java | 317 +++++------
 ...tcherTests_SPEC2_19_IncludeServletEvent.java | 308 +++++-----
 ...ests_SPEC2_19_IncludeServletEvent_event.java |  98 ++--
 ...cherTests_SPEC2_19_IncludeServletRender.java |  81 ++-
 ...erTests_SPEC2_19_IncludeServletResource.java |  82 ++-
 ..._SPEC2_19_DispatchServletAction_servlet.java |  46 +-
 ...s_SPEC2_19_DispatchServletEvent_servlet.java |  46 +-
 ..._SPEC2_19_DispatchServletRender_servlet.java |  46 +-
 ...PEC2_19_DispatchServletResource_servlet.java |  46 +-
 ...s_SPEC2_19_ForwardServletAction_servlet.java | 552 +++++++++++-------
 ...ts_SPEC2_19_ForwardServletEvent_servlet.java | 552 +++++++++++-------
 ...s_SPEC2_19_ForwardServletRender_servlet.java | 556 +++++++++++-------
 ...SPEC2_19_ForwardServletResource_servlet.java | 550 +++++++++++-------
 ...s_SPEC2_19_IncludeServletAction_servlet.java | 548 +++++++++++-------
 ...ts_SPEC2_19_IncludeServletEvent_servlet.java | 548 +++++++++++-------
 ...s_SPEC2_19_IncludeServletRender_servlet.java | 567 ++++++++++++-------
 ...SPEC2_19_IncludeServletResource_servlet.java | 561 +++++++++++-------
 .../src/main/webapp/WEB-INF/portlet.xml         |  37 +-
 .../javax/portlet/tck/beans/TckParameters.java  | 114 ++++
 34 files changed, 4289 insertions(+), 3041 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/c4d0579e/pluto-container/src/main/java/org/apache/pluto/container/impl/StateAwareResponseImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/StateAwareResponseImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/StateAwareResponseImpl.java
index e09fb6e..e1aabc5 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/impl/StateAwareResponseImpl.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/StateAwareResponseImpl.java
@@ -97,6 +97,14 @@ public abstract class StateAwareResponseImpl extends PortletResponseImpl
 
    public void setEvent(QName qname, Serializable value) {
       ArgumentUtility.validateNotNull("qname", qname);
+      
+      if (LOGGER.isTraceEnabled()) {
+         StringBuilder txt = new StringBuilder(128);
+         txt.append("QName: ").append(qname.toString());
+         txt.append(", value class: ").append((value == null) ? "null": value.getClass().getCanonicalName());
+         LOGGER.debug(txt.toString());
+      }
+
       Event event = responseContext.getEventProvider()
             .createEvent(qname, value);
       if (event != null) {

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/c4d0579e/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/ConfigurationProcessor.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/ConfigurationProcessor.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/ConfigurationProcessor.java
index 5c0f24c..2f3d75f 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/ConfigurationProcessor.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/ConfigurationProcessor.java
@@ -10,7 +10,9 @@ import static org.apache.pluto.container.bean.processor.MethodDescription.METH_R
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.PrintWriter;
 import java.io.StringReader;
+import java.io.StringWriter;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -185,6 +187,14 @@ public abstract class ConfigurationProcessor {
             throw new Exception();
          }
       } catch (Exception e) {
+         txt.append(" Exception: ").append(e.toString());
+         if (isDebug) {
+            StringWriter sw = new StringWriter();
+            PrintWriter pw = new PrintWriter(sw);
+            e.printStackTrace(pw);
+            pw.flush();
+            txt.append("\n").append(sw.toString());
+         }
          LOG.warn(txt.toString());
          throw new IllegalArgumentException(txt.toString(), e);
       }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/c4d0579e/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventProviderImpl.java
----------------------------------------------------------------------
diff --git a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventProviderImpl.java b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventProviderImpl.java
index df0ca7d..00f2a81 100644
--- a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventProviderImpl.java
+++ b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventProviderImpl.java
@@ -16,10 +16,14 @@
  */
 package org.apache.pluto.driver.services.container;
 
+import java.io.PrintWriter;
 import java.io.Serializable;
 import java.io.StringWriter;
 import java.io.Writer;
+import java.util.Arrays;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import javax.portlet.Event;
 import javax.xml.bind.JAXBContext;
@@ -43,114 +47,150 @@ import org.apache.pluto.driver.services.portal.PortletWindowConfig;
 /**
  * @version $Id$
  */
-public class EventProviderImpl implements EventProvider
-{
-    /** Logger. */
-    private static final Logger LOG = LoggerFactory.getLogger(EventProviderImpl.class);
-    private PortletWindow portletWindow;
-    private PortletRegistryService portletRegistry;
-    
-    public EventProviderImpl(PortletWindow portletWindow, PortletRegistryService portletRegistry)
-    {
-        this.portletWindow = portletWindow;
-        this.portletRegistry = portletRegistry;
-    }
+public class EventProviderImpl implements EventProvider {
+   /** Logger. */
+   private static final Logger    LOG = LoggerFactory.getLogger(EventProviderImpl.class);
+   private PortletWindow          portletWindow;
+   private PortletRegistryService portletRegistry;
 
-    @SuppressWarnings("unchecked")
-    public Event createEvent(QName qname, Serializable value) throws IllegalArgumentException
-    {
-        if (isDeclaredAsPublishingEvent(qname))
-        {
-            if (value != null && !isValueInstanceOfDefinedClass(qname, value))
-            {
-                throw new IllegalArgumentException("Payload class (" +
-                                                   value.getClass().getCanonicalName() +
-                                                   ") does not have the right class, check your defined event types in portlet.xml.");
-            }
-            try
-            {
-                if (value == null)
-                {
-                    return new EventImpl(qname, value);
-                }
-                else
-                {
-                    ClassLoader cl = Thread.currentThread().getContextClassLoader();
-                    Writer out = new StringWriter();
-                    Class clazz = value.getClass();
-                    try
-                    {
-                        Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
-                        JAXBContext jc = JAXBContext.newInstance(clazz);
-                        Marshaller marshaller = jc.createMarshaller();
-                        JAXBElement<Serializable> element = new JAXBElement<Serializable>(qname, clazz, value);
-                        marshaller.marshal(element, out);
-                    }
-                    finally
-                    {
-                        Thread.currentThread().setContextClassLoader(cl);
-                    }
-                    return new EventImpl(qname, out.toString());
-                }
-            }
-            catch (JAXBException e)
-            {
-                // maybe there is no valid jaxb binding
-                // TODO wsrp:eventHandlingFailed
-                LOG.error("Event handling failed", e);
-            }
-            catch (FactoryConfigurationError e)
-            {
-                LOG.warn(e.getMessage(),e);
+   public EventProviderImpl(PortletWindow portletWindow, PortletRegistryService portletRegistry) {
+      this.portletWindow = portletWindow;
+      this.portletRegistry = portletRegistry;
+      
+      if (LOG.isTraceEnabled()) {
+         StringBuilder txt = new StringBuilder(128);
+         txt.append("Portlet window: ").append(portletWindow.getId().getStringId());
+         LOG.debug(txt.toString());
+      }
+
+   }
+
+   @SuppressWarnings("unchecked")
+   public Event createEvent(QName qname, Serializable value) throws IllegalArgumentException {
+      
+      if (LOG.isDebugEnabled()) {
+         StringBuilder txt = new StringBuilder(128);
+         txt.append("QName: ").append(qname.toString());
+         txt.append(", value class: ").append((value == null) ? "null": value.getClass().getCanonicalName());
+         LOG.debug(txt.toString());
+      }
+      
+      if (isDeclaredAsPublishingEvent(qname)) {
+         if (value != null && !isValueInstanceOfDefinedClass(qname, value)) {
+            throw new IllegalArgumentException("Payload class (" + value.getClass().getCanonicalName()
+                  + ") does not have the right class, check your defined event types in portlet.xml.");
+         }
+         try {
+            if (value == null) {
+               return new EventImpl(qname, value);
+            } else {
+               
+               boolean debug = false;
+               if (LOG.isDebugEnabled() && (value instanceof HashMap)) {
+                  debug = true;
+                  StringBuilder txt = new StringBuilder(128);
+                  txt.append("Event payload params:");
+                  Map<String, String[]> pmap = (HashMap<String, String[]>) value; 
+                  for (String name : pmap.keySet()) {
+                     txt.append("\nname: ").append(name);
+                     txt.append(", vals: ").append(Arrays.toString(pmap.get(name)));
+                  }
+                  LOG.debug(txt.toString());
+               }
+               
+               ClassLoader cl = Thread.currentThread().getContextClassLoader();
+               Writer out = new StringWriter();
+               @SuppressWarnings("rawtypes")
+               Class clazz = value.getClass();
+               try {
+                  Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
+                  JAXBContext jc = JAXBContext.newInstance(clazz);
+                  Marshaller marshaller = jc.createMarshaller();
+                  JAXBElement<Serializable> element = new JAXBElement<Serializable>(qname, clazz, value);
+                  marshaller.marshal(element, out);
+               } finally {
+                  Thread.currentThread().setContextClassLoader(cl);
+               }
+               
+               if (debug) {
+                  LOG.debug("Resulting marshalled HashMap: \n" + out.toString());
+               }
+               
+               return new EventImpl(qname, out.toString());
             }
-        }
-        return null;
-    }
+         } catch (JAXBException e) {
+            // maybe there is no valid jaxb binding
+            LOG.error("Event handling failed", e);
+         } catch (FactoryConfigurationError e) {
+            LOG.warn(e.getMessage(), e);
+         }
+      }
+      return null;
+   }
 
-    private boolean isDeclaredAsPublishingEvent(QName qname)
-    {
-        String applicationId = PortletWindowConfig.parseContextPath(portletWindow.getId().getStringId());
-        String applicationName = applicationId;
-        String portletName = PortletWindowConfig.parsePortletName(portletWindow.getId().getStringId());
-        List<? extends EventDefinitionReference> events = null;
-        try
-        {
-            events = portletRegistry.getPortlet(applicationName, portletName).getSupportedPublishingEvents();
-        }
-        catch (PortletContainerException e1)
-        {
-            e1.printStackTrace();
-        }
-        if (events != null)
-        {
-            for (EventDefinitionReference ref : events)
-            {
-                QName name = ref.getQualifiedName();
-                if (name == null)
-                {
-                    continue;
-                }
-                if (qname.equals(name))
-                {
-                    return true;
-                }
+   private boolean isDeclaredAsPublishingEvent(QName qname) {
+      String applicationId = PortletWindowConfig.parseContextPath(portletWindow.getId().getStringId());
+      String applicationName = applicationId;
+      String portletName = PortletWindowConfig.parsePortletName(portletWindow.getId().getStringId());
+      List<? extends EventDefinitionReference> events = null;
+      try {
+         events = portletRegistry.getPortlet(applicationName, portletName).getSupportedPublishingEvents();
+      } catch (PortletContainerException e1) {
+         e1.printStackTrace();
+      }
+      if (events != null) {
+         for (EventDefinitionReference ref : events) {
+            QName name = ref.getQualifiedName();
+            if (name == null) {
+               continue;
             }
-        }
-        return false;
-    }
+            if (qname.equals(name)) {
+               return true;
+            }
+         }
+      }
+      return false;
+   }
 
    private boolean isValueInstanceOfDefinedClass(QName qname, Serializable value) {
       PortletApplicationDefinition app = portletWindow.getPortletDefinition().getApplication();
-      
+
       List<? extends EventDefinition> events = app.getEventDefinitions();
       if (events != null) {
          for (EventDefinition def : events) {
             if (def.getQName().equals(qname)) {
-               return value.getClass().getName().equals(def.getValueType());
+               Class<?> declaredPayload = null;
+               try {
+                  ClassLoader cl = Thread.currentThread().getContextClassLoader();
+                  if (cl == null) {
+                     cl = this.getClass().getClassLoader();
+                  }
+                  declaredPayload = cl.loadClass(def.getValueType());
+                  if (!declaredPayload.isAssignableFrom(value.getClass())) {
+                     StringBuilder txt = new StringBuilder(128);
+                     txt.append("Error processing payload. ");
+                     txt.append(" Specified class ").append(value.getClass().getCanonicalName());
+                     txt.append(" is not a ").append(declaredPayload.getCanonicalName());
+                     LOG.warn(txt.toString());
+                     return false;
+                  }
+               } catch (Exception e) {
+                  StringBuilder txt = new StringBuilder(128);
+                  txt.append("Error processing payload. ");
+                  txt.append(" Exception: ").append(e.toString());
+                  StringWriter sw = new StringWriter();
+                  PrintWriter pw = new PrintWriter(sw);
+                  e.printStackTrace(pw);
+                  pw.flush();
+                  txt.append("\n").append(sw.toString());
+                  LOG.warn(txt.toString());
+                  return false;
+               }
+               return true;
             }
          }
       }
-        // event not declared
-        return true;
-    }
+      // event not found
+      return false;
+   }
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/c4d0579e/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletStateAwareResponseContextImpl.java
----------------------------------------------------------------------
diff --git a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletStateAwareResponseContextImpl.java b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletStateAwareResponseContextImpl.java
index 4d2f27c..45359af 100644
--- a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletStateAwareResponseContextImpl.java
+++ b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletStateAwareResponseContextImpl.java
@@ -53,6 +53,7 @@ public abstract class PortletStateAwareResponseContextImpl extends PortletRespon
 
     private List<Event> events;
     private PortletURLProviderImpl portletURLProvider;
+    private EventProviderImpl eventProviderImpl;
     
     public PortletStateAwareResponseContextImpl(PortletContainer container, HttpServletRequest containerRequest,
                                                 HttpServletResponse containerResponse, PortletWindow window, PortletRequestContext requestContext)
@@ -60,6 +61,7 @@ public abstract class PortletStateAwareResponseContextImpl extends PortletRespon
         super(container, containerRequest, containerResponse, window, requestContext);
         this.portletURLProvider = new PortletURLProviderImpl(getPortalURL(), 
               PortletURLProvider.TYPE.RENDER, window, getRequestContext());
+        this.eventProviderImpl = new EventProviderImpl(getPortletWindow(), PlutoServices.getServices().getPortletRegistryService());
         
         if (isDebug) {
            LOGGER.debug("Initialized.");
@@ -155,7 +157,7 @@ public abstract class PortletStateAwareResponseContextImpl extends PortletRespon
 
     public EventProvider getEventProvider()
     {
-        return isClosed() ? null : new EventProviderImpl(getPortletWindow(), PlutoServices.getServices().getPortletRegistryService());
+        return isClosed() ? null : eventProviderImpl;
     }
 
     

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/c4d0579e/pluto-taglib/src/main/java/org/apache/pluto/tags/BaseURLTag.java
----------------------------------------------------------------------
diff --git a/pluto-taglib/src/main/java/org/apache/pluto/tags/BaseURLTag.java b/pluto-taglib/src/main/java/org/apache/pluto/tags/BaseURLTag.java
index 1971e82..23047e7 100644
--- a/pluto-taglib/src/main/java/org/apache/pluto/tags/BaseURLTag.java
+++ b/pluto-taglib/src/main/java/org/apache/pluto/tags/BaseURLTag.java
@@ -83,8 +83,9 @@ public abstract class BaseURLTag extends TagSupport {
       if (secure != null) {
             try {                   
                 url.setSecure(getSecureBoolean());                    
-            } catch (PortletSecurityException e) {                   
-                throw new JspException(e);                    
+            } catch (PortletSecurityException e) {
+                // ignore exception as Pluto doesn't support setSecure
+                // throw new JspException(e);                    
             }
         }
 	}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/c4d0579e/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletAction.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletAction.java b/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletAction.java
index b490147..c945ddd 100644
--- a/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletAction.java
+++ b/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletAction.java
@@ -18,21 +18,37 @@
 
 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.*;
+import static javax.portlet.PortletSession.APPLICATION_SCOPE;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETACTION_DISPATCH1;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETACTION_DISPATCH2;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETACTION_DISPATCH3;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETACTION_DISPATCH4;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETACTION_DISPATCH5;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETACTION_DISPATCH6;
+import static javax.portlet.tck.constants.Constants.RESULT_ATTR_PREFIX;
+import static javax.portlet.tck.constants.Constants.THREADID_ATTR;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.Portlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.PortletSession;
+import javax.portlet.PortletURL;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
+import javax.portlet.ResourceServingPortlet;
+import javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails;
+import javax.portlet.tck.beans.TestButton;
+import javax.portlet.tck.beans.TestResult;
+import javax.portlet.tck.constants.Constants;
 
 /**
  * This portlet implements several test cases for the JSR 362 TCK. The test case names
@@ -46,9 +62,8 @@ import static javax.portlet.ResourceURL.*;
  *
  */
 public class DispatcherTests_SPEC2_19_DispatchServletAction implements Portlet, ResourceServingPortlet {
-   private static final String LOG_CLASS = 
-         DispatcherTests_SPEC2_19_DispatchServletAction.class.getName();
-   private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
+
+
    
    private PortletConfig portletConfig = null;
 
@@ -64,7 +79,7 @@ public class DispatcherTests_SPEC2_19_DispatchServletAction implements Portlet,
    @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();
@@ -153,19 +168,17 @@ public class DispatcherTests_SPEC2_19_DispatchServletAction implements Portlet,
    @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);

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/c4d0579e/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletEvent.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletEvent.java b/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletEvent.java
index 0d5bffb..ec8c185 100644
--- a/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletEvent.java
+++ b/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletEvent.java
@@ -18,21 +18,26 @@
 
 package javax.portlet.tck.portlets;
 
-import java.io.*;
-import java.util.*;
-import java.util.logging.*;
-import static java.util.logging.Logger.*;
+import static javax.portlet.tck.constants.Constants.TCKNAMESPACE;
+import static javax.portlet.tck.constants.Constants.THREADID_ATTR;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.Portlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletURL;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
+import javax.portlet.ResourceServingPortlet;
+import javax.portlet.tck.beans.TckParameters;
+import javax.portlet.tck.beans.TestButton;
 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
@@ -46,15 +51,10 @@ import static javax.portlet.ResourceURL.*;
  *
  */
 public class DispatcherTests_SPEC2_19_DispatchServletEvent implements Portlet, ResourceServingPortlet {
-   private static final String LOG_CLASS = 
-         DispatcherTests_SPEC2_19_DispatchServletEvent.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
@@ -64,35 +64,31 @@ public class DispatcherTests_SPEC2_19_DispatchServletEvent implements Portlet, R
    @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,
              "DispatcherTests_SPEC2_19_DispatchServletEvent");
-      portletResp.setEvent(eventQName, "Hi!");
+      portletResp.setEvent(eventQName, new TckParameters(portletReq.getParameterMap()));
    }
 
    @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);

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/c4d0579e/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletEvent_event.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletEvent_event.java b/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletEvent_event.java
index 6b96514..59c5e1b 100644
--- a/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletEvent_event.java
+++ b/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletEvent_event.java
@@ -18,29 +18,48 @@
 
 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.*;
+import static javax.portlet.PortletSession.APPLICATION_SCOPE;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETEVENT_DISPATCH1;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETEVENT_DISPATCH2;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETEVENT_DISPATCH3;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETEVENT_DISPATCH4;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETEVENT_DISPATCH5;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETEVENT_DISPATCH6;
+import static javax.portlet.tck.constants.Constants.RESULT_ATTR_PREFIX;
+import static javax.portlet.tck.constants.Constants.THREADID_ATTR;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.EventPortlet;
+import javax.portlet.EventRequest;
+import javax.portlet.EventResponse;
+import javax.portlet.Portlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
+import javax.portlet.ResourceServingPortlet;
+import javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails;
+import javax.portlet.tck.beans.TckParameters;
+import javax.portlet.tck.beans.TckParameters.Parameter;
+import javax.portlet.tck.beans.TestResult;
+import javax.portlet.tck.constants.Constants;
 
 /**
  * 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 DispatcherTests_SPEC2_19_DispatchServletEvent_event implements Portlet, EventPortlet, ResourceServingPortlet {
-   private static final String LOG_CLASS = 
-         DispatcherTests_SPEC2_19_DispatchServletEvent_event.class.getName();
-   private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
+
+
    
    private PortletConfig portletConfig = null;
 
@@ -56,19 +75,19 @@ public class DispatcherTests_SPEC2_19_DispatchServletEvent_event implements Port
    @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);
@@ -78,6 +97,11 @@ public class DispatcherTests_SPEC2_19_DispatchServletEvent_event implements Port
 
       StringWriter writer = new StringWriter();
 
+      TckParameters params = (TckParameters)portletReq.getEvent().getValue();
+      for (Parameter p : params.getParams()) {
+         portletResp.setRenderParameter(p.getName(), p.getVals());
+      }
+
       JSR286DispatcherTestCaseDetails tcd = new JSR286DispatcherTestCaseDetails();
 
       // Create result objects for the tests
@@ -161,7 +185,7 @@ public class DispatcherTests_SPEC2_19_DispatchServletEvent_event implements Port
    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();

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/c4d0579e/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletRender.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletRender.java b/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletRender.java
index 50cfb40..23632dd 100644
--- a/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletRender.java
+++ b/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletRender.java
@@ -18,38 +18,45 @@
 
 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.*;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRENDER_DISPATCH1;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRENDER_DISPATCH2;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRENDER_DISPATCH3;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRENDER_DISPATCH4;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRENDER_DISPATCH5;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRENDER_DISPATCH6;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRENDER_INVOKE2;
+import static javax.portlet.tck.constants.Constants.THREADID_ATTR;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.Portlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
+import javax.portlet.ResourceServingPortlet;
+import javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails;
+import javax.portlet.tck.beans.TestResult;
 
 /**
- * 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 DispatcherTests_SPEC2_19_DispatchServletRender_event
- *
+ * 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
+ * DispatcherTests_SPEC2_19_DispatchServletRender_event
+ * 
  */
 public class DispatcherTests_SPEC2_19_DispatchServletRender implements Portlet, ResourceServingPortlet {
-   private static final String LOG_CLASS = 
-         DispatcherTests_SPEC2_19_DispatchServletRender.class.getName();
-   private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
-   
+
    private PortletConfig portletConfig = null;
 
    @Override
@@ -62,34 +69,29 @@ public class DispatcherTests_SPEC2_19_DispatchServletRender implements Portlet,
    }
 
    @Override
-   public void processAction(ActionRequest portletReq, ActionResponse portletResp)
-         throws PortletException, IOException {
-      LOGGER.entering(LOG_CLASS, "main portlet processAction entry");
+   public void processAction(ActionRequest portletReq, ActionResponse portletResp) throws PortletException, IOException {
 
       portletResp.setRenderParameters(portletReq.getParameterMap());
       long tid = Thread.currentThread().getId();
       portletReq.setAttribute(THREADID_ATTR, tid);
 
-      StringWriter writer = new StringWriter();
+      new StringWriter();
 
    }
 
    @Override
-   public void serveResource(ResourceRequest portletReq, ResourceResponse portletResp)
-         throws PortletException, IOException {
-      LOGGER.entering(LOG_CLASS, "main portlet serveResource entry");
+   public void serveResource(ResourceRequest portletReq, ResourceResponse portletResp) throws PortletException,
+         IOException {
 
       long tid = Thread.currentThread().getId();
       portletReq.setAttribute(THREADID_ATTR, tid);
 
-      PrintWriter writer = portletResp.getWriter();
+      portletResp.getWriter();
 
    }
 
    @Override
-   public void render(RenderRequest portletReq, RenderResponse portletResp)
-         throws PortletException, IOException {
-      LOGGER.entering(LOG_CLASS, "main portlet render entry");
+   public void render(RenderRequest portletReq, RenderResponse portletResp) throws PortletException, IOException {
 
       long tid = Thread.currentThread().getId();
       portletReq.setAttribute(THREADID_ATTR, tid);
@@ -101,86 +103,101 @@ public class DispatcherTests_SPEC2_19_DispatchServletRender implements Portlet,
       // Create result objects for the tests
 
       /* TestCase: V2DispatcherTests_SPEC2_19_DispatchServletRender_dispatch1 */
-      /* Details: "The PortletContext getRequestDispatcher method returns a   */
-      /* PortletRequestDispatcher for a path within the portlet               */
-      /* application"                                                         */
+      /* Details: "The PortletContext getRequestDispatcher method returns a */
+      /* PortletRequestDispatcher for a path within the portlet */
+      /* application" */
       TestResult tr0 = tcd.getTestResultFailed(V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRENDER_DISPATCH1);
       try {
-         PortletRequestDispatcher rd = portletConfig.getPortletContext()
-               .getRequestDispatcher("/DispatcherTests_SPEC2_19_DispatchServletRender_servlet");
+         PortletRequestDispatcher rd = portletConfig.getPortletContext().getRequestDispatcher(
+               "/DispatcherTests_SPEC2_19_DispatchServletRender_servlet");
          tr0.setTcSuccess(rd != null);
-      } catch(Exception e) {tr0.appendTcDetail(e.toString());}
+      } catch (Exception e) {
+         tr0.appendTcDetail(e.toString());
+      }
       tr0.writeTo(writer);
 
       /* TestCase: V2DispatcherTests_SPEC2_19_DispatchServletRender_dispatch2 */
-      /* Details: "If the path provided to getRequestDispatcher method does   */
-      /* not start with \"/\", the method returns null"                       */
+      /* Details: "If the path provided to getRequestDispatcher method does */
+      /* not start with \"/\", the method returns null" */
       TestResult tr1 = tcd.getTestResultFailed(V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRENDER_DISPATCH2);
       try {
-         PortletRequestDispatcher rd = portletConfig.getPortletContext()
-               .getRequestDispatcher("DispatcherTests_SPEC2_19_DispatchServletRender_servlet");
+         PortletRequestDispatcher rd = portletConfig.getPortletContext().getRequestDispatcher(
+               "DispatcherTests_SPEC2_19_DispatchServletRender_servlet");
          tr1.setTcSuccess(rd == null);
-      } catch(Exception e) {tr1.appendTcDetail(e.toString());}
+      } catch (Exception e) {
+         tr1.appendTcDetail(e.toString());
+      }
       tr1.writeTo(writer);
 
       /* TestCase: V2DispatcherTests_SPEC2_19_DispatchServletRender_dispatch3 */
-      /* Details: "If the path provided to getRequestDispatcher method ends   */
-      /* with \"/\", the method returns null"                                 */
+      /* Details: "If the path provided to getRequestDispatcher method ends */
+      /* with \"/\", the method returns null" */
       TestResult tr2 = tcd.getTestResultFailed(V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRENDER_DISPATCH3);
       try {
-         PortletRequestDispatcher rd = portletConfig.getPortletContext()
-               .getRequestDispatcher("DispatcherTests_SPEC2_19_DispatchServletRender_servlet");
+         PortletRequestDispatcher rd = portletConfig.getPortletContext().getRequestDispatcher(
+               "DispatcherTests_SPEC2_19_DispatchServletRender_servlet");
          tr2.setTcSuccess(rd == null);
-      } catch(Exception e) {tr2.appendTcDetail(e.toString());}
+      } catch (Exception e) {
+         tr2.appendTcDetail(e.toString());
+      }
       tr2.writeTo(writer);
 
       /* TestCase: V2DispatcherTests_SPEC2_19_DispatchServletRender_dispatch4 */
-      /* Details: "If the path provided to getRequestDispatcher method does   */
-      /* not specify a valid path, the method returns null"                   */
+      /* Details: "If the path provided to getRequestDispatcher method does */
+      /* not specify a valid path, the method returns null" */
       TestResult tr3 = tcd.getTestResultFailed(V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRENDER_DISPATCH4);
       try {
-         PortletRequestDispatcher rd = portletConfig.getPortletContext()
-               .getRequestDispatcher(" Invalid path.jsp ");
+         PortletRequestDispatcher rd = portletConfig.getPortletContext().getRequestDispatcher(" Invalid path.jsp ");
          tr3.setTcSuccess(rd == null);
-      } catch(Exception e) {tr3.appendTcDetail(e.toString());}
+      } catch (Exception e) {
+         tr3.appendTcDetail(e.toString());
+      }
       tr3.writeTo(writer);
 
       /* TestCase: V2DispatcherTests_SPEC2_19_DispatchServletRender_dispatch5 */
-      /* Details: "The PortletContext getNamedDispatcher method returns a     */
-      /* PortletRequestDispatcher for a servlet within the portlet            */
-      /* application"                                                         */
+      /* Details: "The PortletContext getNamedDispatcher method returns a */
+      /* PortletRequestDispatcher for a servlet within the portlet */
+      /* application" */
       TestResult tr4 = tcd.getTestResultFailed(V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRENDER_DISPATCH5);
       try {
-         PortletRequestDispatcher rd = portletConfig.getPortletContext()
-               .getNamedDispatcher("DispatcherTests_SPEC2_19_DispatchServletRender_servlet");
+         PortletRequestDispatcher rd = portletConfig.getPortletContext().getNamedDispatcher(
+               "DispatcherTests_SPEC2_19_DispatchServletRender_servlet");
          tr4.setTcSuccess(rd != null);
-      } catch(Exception e) {tr4.appendTcDetail(e.toString());}
+      } catch (Exception e) {
+         tr4.appendTcDetail(e.toString());
+      }
       tr4.writeTo(writer);
 
       /* TestCase: V2DispatcherTests_SPEC2_19_DispatchServletRender_dispatch6 */
-      /* Details: "If the name provided to getNamedDispatcher method is not   */
-      /* valid, the method returns null"                                      */
+      /* Details: "If the name provided to getNamedDispatcher method is not */
+      /* valid, the method returns null" */
       TestResult tr5 = tcd.getTestResultFailed(V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRENDER_DISPATCH6);
       try {
-         PortletRequestDispatcher rd = portletConfig.getPortletContext()
-               .getNamedDispatcher("Invalid Name");
+         PortletRequestDispatcher rd = portletConfig.getPortletContext().getNamedDispatcher("Invalid Name");
          tr5.setTcSuccess(rd == null);
-         
-      } catch(Exception e) {tr5.appendTcDetail(e.toString());}
+
+      } catch (Exception e) {
+         tr5.appendTcDetail(e.toString());
+      }
       tr5.writeTo(writer);
 
-      /* TestCase: V2DispatcherTests_SPEC2_19_DispatchServletRender_invoke2   */
-      /* Details: "If the forward method is called after the response has     */
-      /* been committed, an IllegalStateException exception is thrown"        */
+      /* TestCase: V2DispatcherTests_SPEC2_19_DispatchServletRender_invoke2 */
+      /* Details: "If the forward method is called after the response has */
+      /* been committed, an IllegalStateException exception is thrown" */
       TestResult tr6 = tcd.getTestResultFailed(V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRENDER_INVOKE2);
       try {
-         PortletRequestDispatcher rd = portletConfig.getPortletContext()
-               .getRequestDispatcher("/DispatcherTests_SPEC2_19_DispatchServletRender_servlet");
+         PortletRequestDispatcher rd = portletConfig.getPortletContext().getRequestDispatcher(
+               "/DispatcherTests_SPEC2_19_DispatchServletRender_servlet");
          writer.write("<p>Test output</p>");
          portletResp.flushBuffer();
-         try {rd.forward(portletReq, portletResp);}
-         catch(IllegalStateException ise) {tr6.setTcSuccess(true);}
-      } catch(Exception e) {tr6.appendTcDetail(e.toString());}
+         try {
+            rd.forward(portletReq, portletResp);
+         } catch (IllegalStateException ise) {
+            tr6.setTcSuccess(true);
+         }
+      } catch (Exception e) {
+         tr6.appendTcDetail(e.toString());
+      }
       tr6.writeTo(writer);
 
    }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/c4d0579e/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletResource.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletResource.java b/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletResource.java
index 5a92af3..73d2714 100644
--- a/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletResource.java
+++ b/portlet-tck_3.0/V2DispatcherTests/src/main/java/javax/portlet/tck/portlets/DispatcherTests_SPEC2_19_DispatchServletResource.java
@@ -18,38 +18,47 @@
 
 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.*;
+import static javax.portlet.ResourceURL.PAGE;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRESOURCE_DISPATCH1;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRESOURCE_DISPATCH2;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRESOURCE_DISPATCH3;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRESOURCE_DISPATCH4;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRESOURCE_DISPATCH5;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRESOURCE_DISPATCH6;
+import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRESOURCE_INVOKE2;
+import static javax.portlet.tck.constants.Constants.THREADID_ATTR;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.Portlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
+import javax.portlet.ResourceServingPortlet;
+import javax.portlet.ResourceURL;
+import javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails;
+import javax.portlet.tck.beans.TestResult;
 
 /**
- * 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 DispatcherTests_SPEC2_19_DispatchServletResource_event
- *
+ * 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
+ * DispatcherTests_SPEC2_19_DispatchServletResource_event
+ * 
  */
 public class DispatcherTests_SPEC2_19_DispatchServletResource implements Portlet, ResourceServingPortlet {
-   private static final String LOG_CLASS = 
-         DispatcherTests_SPEC2_19_DispatchServletResource.class.getName();
-   private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
-   
+
    private PortletConfig portletConfig = null;
 
    @Override
@@ -62,22 +71,19 @@ public class DispatcherTests_SPEC2_19_DispatchServletResource implements Portlet
    }
 
    @Override
-   public void processAction(ActionRequest portletReq, ActionResponse portletResp)
-         throws PortletException, IOException {
-      LOGGER.entering(LOG_CLASS, "main portlet processAction entry");
+   public void processAction(ActionRequest portletReq, ActionResponse portletResp) throws PortletException, IOException {
 
       portletResp.setRenderParameters(portletReq.getParameterMap());
       long tid = Thread.currentThread().getId();
       portletReq.setAttribute(THREADID_ATTR, tid);
 
-      StringWriter writer = new StringWriter();
+      new StringWriter();
 
    }
 
    @Override
-   public void serveResource(ResourceRequest portletReq, ResourceResponse portletResp)
-         throws PortletException, IOException {
-      LOGGER.entering(LOG_CLASS, "main portlet serveResource entry");
+   public void serveResource(ResourceRequest portletReq, ResourceResponse portletResp) throws PortletException,
+         IOException {
 
       long tid = Thread.currentThread().getId();
       portletReq.setAttribute(THREADID_ATTR, tid);
@@ -89,94 +95,107 @@ public class DispatcherTests_SPEC2_19_DispatchServletResource implements Portlet
       // Create result objects for the tests
 
       /* TestCase: V2DispatcherTests_SPEC2_19_DispatchServletResource_dispatch1 */
-      /* Details: "The PortletContext getRequestDispatcher method returns a   */
-      /* PortletRequestDispatcher for a path within the portlet               */
-      /* application"                                                         */
+      /* Details: "The PortletContext getRequestDispatcher method returns a */
+      /* PortletRequestDispatcher for a path within the portlet */
+      /* application" */
       TestResult tr0 = tcd.getTestResultFailed(V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRESOURCE_DISPATCH1);
       try {
-         PortletRequestDispatcher rd = portletConfig.getPortletContext()
-               .getRequestDispatcher("/DispatcherTests_SPEC2_19_DispatchServletResource_servlet");
+         PortletRequestDispatcher rd = portletConfig.getPortletContext().getRequestDispatcher(
+               "/DispatcherTests_SPEC2_19_DispatchServletResource_servlet");
          tr0.setTcSuccess(rd != null);
-      } catch(Exception e) {tr0.appendTcDetail(e.toString());}
+      } catch (Exception e) {
+         tr0.appendTcDetail(e.toString());
+      }
       tr0.writeTo(writer);
 
       /* TestCase: V2DispatcherTests_SPEC2_19_DispatchServletResource_dispatch2 */
-      /* Details: "If the path provided to getRequestDispatcher method does   */
-      /* not start with \"/\", the method returns null"                       */
+      /* Details: "If the path provided to getRequestDispatcher method does */
+      /* not start with \"/\", the method returns null" */
       TestResult tr1 = tcd.getTestResultFailed(V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRESOURCE_DISPATCH2);
       try {
-         PortletRequestDispatcher rd = portletConfig.getPortletContext()
-               .getRequestDispatcher("DispatcherTests_SPEC2_19_DispatchServletResource_servlet");
+         PortletRequestDispatcher rd = portletConfig.getPortletContext().getRequestDispatcher(
+               "DispatcherTests_SPEC2_19_DispatchServletResource_servlet");
          tr1.setTcSuccess(rd == null);
-      } catch(Exception e) {tr1.appendTcDetail(e.toString());}
+      } catch (Exception e) {
+         tr1.appendTcDetail(e.toString());
+      }
       tr1.writeTo(writer);
 
       /* TestCase: V2DispatcherTests_SPEC2_19_DispatchServletResource_dispatch3 */
-      /* Details: "If the path provided to getRequestDispatcher method ends   */
-      /* with \"/\", the method returns null"                                 */
+      /* Details: "If the path provided to getRequestDispatcher method ends */
+      /* with \"/\", the method returns null" */
       TestResult tr2 = tcd.getTestResultFailed(V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRESOURCE_DISPATCH3);
       try {
-         PortletRequestDispatcher rd = portletConfig.getPortletContext()
-               .getRequestDispatcher("DispatcherTests_SPEC2_19_DispatchServletResource_servlet");
+         PortletRequestDispatcher rd = portletConfig.getPortletContext().getRequestDispatcher(
+               "DispatcherTests_SPEC2_19_DispatchServletResource_servlet");
          tr2.setTcSuccess(rd == null);
-      } catch(Exception e) {tr2.appendTcDetail(e.toString());}
+      } catch (Exception e) {
+         tr2.appendTcDetail(e.toString());
+      }
       tr2.writeTo(writer);
 
       /* TestCase: V2DispatcherTests_SPEC2_19_DispatchServletResource_dispatch4 */
-      /* Details: "If the path provided to getRequestDispatcher method does   */
-      /* not specify a valid path, the method returns null"                   */
+      /* Details: "If the path provided to getRequestDispatcher method does */
+      /* not specify a valid path, the method returns null" */
       TestResult tr3 = tcd.getTestResultFailed(V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRESOURCE_DISPATCH4);
       try {
-         PortletRequestDispatcher rd = portletConfig.getPortletContext()
-               .getRequestDispatcher(" Invalid path.jsp ");
+         PortletRequestDispatcher rd = portletConfig.getPortletContext().getRequestDispatcher(" Invalid path.jsp ");
          tr3.setTcSuccess(rd == null);
-      } catch(Exception e) {tr3.appendTcDetail(e.toString());}
+      } catch (Exception e) {
+         tr3.appendTcDetail(e.toString());
+      }
       tr3.writeTo(writer);
 
       /* TestCase: V2DispatcherTests_SPEC2_19_DispatchServletResource_dispatch5 */
-      /* Details: "The PortletContext getNamedDispatcher method returns a     */
-      /* PortletRequestDispatcher for a servlet within the portlet            */
-      /* application"                                                         */
+      /* Details: "The PortletContext getNamedDispatcher method returns a */
+      /* PortletRequestDispatcher for a servlet within the portlet */
+      /* application" */
       TestResult tr4 = tcd.getTestResultFailed(V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRESOURCE_DISPATCH5);
       try {
-         PortletRequestDispatcher rd = portletConfig.getPortletContext()
-               .getNamedDispatcher("DispatcherTests_SPEC2_19_DispatchServletResource_servlet");
+         PortletRequestDispatcher rd = portletConfig.getPortletContext().getNamedDispatcher(
+               "DispatcherTests_SPEC2_19_DispatchServletResource_servlet");
          tr4.setTcSuccess(rd != null);
-      } catch(Exception e) {tr4.appendTcDetail(e.toString());}
+      } catch (Exception e) {
+         tr4.appendTcDetail(e.toString());
+      }
       tr4.writeTo(writer);
 
       /* TestCase: V2DispatcherTests_SPEC2_19_DispatchServletResource_dispatch6 */
-      /* Details: "If the name provided to getNamedDispatcher method is not   */
-      /* valid, the method returns null"                                      */
+      /* Details: "If the name provided to getNamedDispatcher method is not */
+      /* valid, the method returns null" */
       TestResult tr5 = tcd.getTestResultFailed(V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRESOURCE_DISPATCH6);
       try {
-         PortletRequestDispatcher rd = portletConfig.getPortletContext()
-               .getNamedDispatcher("Invalid Name");
+         PortletRequestDispatcher rd = portletConfig.getPortletContext().getNamedDispatcher("Invalid Name");
          tr5.setTcSuccess(rd == null);
-         
-      } catch(Exception e) {tr5.appendTcDetail(e.toString());}
+
+      } catch (Exception e) {
+         tr5.appendTcDetail(e.toString());
+      }
       tr5.writeTo(writer);
 
       /* TestCase: V2DispatcherTests_SPEC2_19_DispatchServletResource_invoke2 */
-      /* Details: "If the forward method is called after the response has     */
-      /* been committed, an IllegalStateException exception is thrown"        */
+      /* Details: "If the forward method is called after the response has */
+      /* been committed, an IllegalStateException exception is thrown" */
       TestResult tr6 = tcd.getTestResultFailed(V2DISPATCHERTESTS_SPEC2_19_DISPATCHSERVLETRESOURCE_INVOKE2);
       try {
-         PortletRequestDispatcher rd = portletConfig.getPortletContext()
-               .getRequestDispatcher("/DispatcherTests_SPEC2_19_DispatchServletResource_servlet");
+         PortletRequestDispatcher rd = portletConfig.getPortletContext().getRequestDispatcher(
+               "/DispatcherTests_SPEC2_19_DispatchServletResource_servlet");
          writer.write("<p>Test output</p>");
          portletResp.flushBuffer();
-         try {rd.forward(portletReq, portletResp);}
-         catch(IllegalStateException ise) {tr6.setTcSuccess(true);}
-      } catch(Exception e) {tr6.appendTcDetail(e.toString());}
+         try {
+            rd.forward(portletReq, portletResp);
+         } catch (IllegalStateException ise) {
+            tr6.setTcSuccess(true);
+         }
+      } catch (Exception e) {
+         tr6.appendTcDetail(e.toString());
+      }
       tr6.writeTo(writer);
 
    }
 
    @Override
-   public void render(RenderRequest portletReq, RenderResponse portletResp)
-         throws PortletException, IOException {
-      LOGGER.entering(LOG_CLASS, "main portlet render entry");
+   public void render(RenderRequest portletReq, RenderResponse portletResp) throws PortletException, IOException {
 
       long tid = Thread.currentThread().getId();
       portletReq.setAttribute(THREADID_ATTR, tid);


Mime
View raw message