You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by ms...@apache.org on 2015/11/27 13:37:59 UTC
[18/38] portals-pluto git commit: Fixed defects in portlet war
deployment code
Fixed defects in portlet war deployment code
Project: http://git-wip-us.apache.org/repos/asf/portals-pluto/repo
Commit: http://git-wip-us.apache.org/repos/asf/portals-pluto/commit/802dadb4
Tree: http://git-wip-us.apache.org/repos/asf/portals-pluto/tree/802dadb4
Diff: http://git-wip-us.apache.org/repos/asf/portals-pluto/diff/802dadb4
Branch: refs/heads/V3Prototype
Commit: 802dadb4624ab5e0969598c03933f5cc59e65545
Parents: 54db276
Author: Scott Nicklous <ms...@apache.org>
Authored: Tue Oct 27 12:39:51 2015 +0100
Committer: Scott Nicklous <ms...@apache.org>
Committed: Tue Oct 27 12:39:51 2015 +0100
----------------------------------------------------------------------
pluto-container/pom.xml | 3 +
.../om/portlet/impl/ConfigurationHolder.java | 32 +-
.../impl/JSR286ConfigurationProcessor.java | 2 +-
.../src/main/webapp/WEB-INF/portlet.xml | 150 ++++-----
.../util/assemble/file/FileAssemblerTest.java | 210 ++++++------
.../assemble/file/assembled.webServlet23.xml | 125 +++++++
.../util/assemble/file/portletWebServlet23.xml | 325 +++++++++++++++++++
.../pluto/util/assemble/file/webServlet23.xml | 78 +++++
8 files changed, 757 insertions(+), 168 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/802dadb4/pluto-container/pom.xml
----------------------------------------------------------------------
diff --git a/pluto-container/pom.xml b/pluto-container/pom.xml
index 26ed23b..e3129c0 100644
--- a/pluto-container/pom.xml
+++ b/pluto-container/pom.xml
@@ -128,6 +128,9 @@
<instructions>
<Export-Package>org.apache.pluto.container.impl,
org.apache.pluto.container.om.portlet.impl,
+ org.apache.pluto.container.om.portlet10.impl,
+ org.apache.pluto.container.om.portlet20.impl,
+ org.apache.pluto.container.om.portlet30.impl,
org.apache.pluto.container.util
</Export-Package>
</instructions>
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/802dadb4/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/ConfigurationHolder.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/ConfigurationHolder.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/ConfigurationHolder.java
index bd0fcb1..f547bd2 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/ConfigurationHolder.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/ConfigurationHolder.java
@@ -120,7 +120,37 @@ public class ConfigurationHolder {
public void processPortletDD(InputStream stream)
throws IOException, IllegalArgumentException, JAXBException, XMLStreamException {
- JAXBContext cntxt = JAXBContext.newInstance(JAXB_CONTEXT);
+ if (isDebug) {
+ StringBuilder txt = new StringBuilder(128);
+ txt.append("Info about classloaders:");
+ ClassLoader mycl = this.getClass().getClassLoader();
+ ClassLoader jaxbcl = JAXBContext.class.getClassLoader();
+ ClassLoader ofcl = org.apache.pluto.container.om.portlet20.impl.ObjectFactory.class.getClassLoader();
+ ClassLoader syscl = null;
+ try {syscl = ClassLoader.getSystemClassLoader();} catch(Exception e) {}
+ txt.append("\nmy classloader: ").append((mycl != null) ? mycl.toString() : "null");
+ txt.append("\njaxb classloader: ").append((jaxbcl != null) ? jaxbcl.toString() : "null");
+ txt.append("\nof classloader: ").append((ofcl != null) ? ofcl.toString() : "null");
+ txt.append("\nsys classloader: ").append((syscl != null) ? syscl.toString() : "null");
+ Class<?> myof = null;
+ Class<?> jaxbof = null;
+ Class<?> ofof = null;
+ Class<?> sysof = null;
+ String clsName = "org.apache.pluto.container.om.portlet20.impl.ObjectFactory";
+ try {myof = mycl.loadClass(clsName);} catch(Exception e) {}
+ try {jaxbof = jaxbcl.loadClass(clsName);} catch(Exception e) {}
+ try {ofof = ofcl.loadClass(clsName);} catch(Exception e) {}
+ try {sysof = syscl.loadClass(clsName);} catch(Exception e) {}
+ txt.append("\nNow attempting to load: ").append(clsName);
+ txt.append("\nMycl loaded: ").append(myof != null);
+ txt.append("\nJaxbofcl loaded: ").append(jaxbof != null);
+ txt.append("\nOfcl loaded: ").append(ofof != null);
+ txt.append("\nSyscl loaded: ").append(sysof != null);
+ LOG.debug(txt.toString());
+ }
+
+ ClassLoader mycl = this.getClass().getClassLoader();
+ JAXBContext cntxt = JAXBContext.newInstance(JAXB_CONTEXT, mycl);
Unmarshaller um = cntxt.createUnmarshaller();
XMLInputFactory xif = XMLInputFactory.newFactory();
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/802dadb4/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR286ConfigurationProcessor.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR286ConfigurationProcessor.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR286ConfigurationProcessor.java
index 0f32ad0..565efed 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR286ConfigurationProcessor.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR286ConfigurationProcessor.java
@@ -311,7 +311,7 @@ public class JSR286ConfigurationProcessor extends ConfigurationProcessor {
if (pad.getPortlet(pname) == null) {
String warning = "Bad FilterMapping definition. Portlet definition not found: " + pname;
LOG.warn(warning);
- throw new IllegalArgumentException(warning);
+// throw new IllegalArgumentException(warning);
}
newitem.addPortletName(pname);
}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/802dadb4/pluto-portal/src/main/webapp/WEB-INF/portlet.xml
----------------------------------------------------------------------
diff --git a/pluto-portal/src/main/webapp/WEB-INF/portlet.xml b/pluto-portal/src/main/webapp/WEB-INF/portlet.xml
index adb3c0a..4d0c433 100644
--- a/pluto-portal/src/main/webapp/WEB-INF/portlet.xml
+++ b/pluto-portal/src/main/webapp/WEB-INF/portlet.xml
@@ -1,75 +1,75 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<portlet-app
- xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
- version="1.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd
- http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
-
- <portlet>
- <description>AboutPortletDescription</description>
- <portlet-name>AboutPortlet</portlet-name>
- <display-name>About Portlet</display-name>
- <portlet-class>org.apache.pluto.driver.portlets.AboutPortlet</portlet-class>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>VIEW</portlet-mode>
- <portlet-mode>EDIT</portlet-mode>
- <portlet-mode>HELP</portlet-mode>
- </supports>
- <portlet-info>
- <title>About Apache Pluto</title>
- </portlet-info>
- </portlet>
-
- <portlet>
- <description>AdminPortletDescription</description>
- <portlet-name>AdminPortlet</portlet-name>
- <display-name>Admin Portlet</display-name>
- <portlet-class>org.apache.pluto.driver.portlets.AdminPortlet</portlet-class>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>VIEW</portlet-mode>
- <portlet-mode>EDIT</portlet-mode>
- <portlet-mode>HELP</portlet-mode>
- </supports>
- <portlet-info>
- <title>Apache Pluto Portal Admin</title>
- </portlet-info>
- </portlet>
-
- <portlet>
- <description>Used to administer pluto pages</description>
- <portlet-name>PlutoPageAdmin</portlet-name>
- <display-name>Pluto Page Administration Portlet</display-name>
- <portlet-class>org.apache.pluto.driver.portlets.PageAdminPortlet</portlet-class>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>VIEW</portlet-mode>
- <portlet-mode>HELP</portlet-mode>
- </supports>
- <portlet-info>
- <title>Pluto Page Administrator</title>
- </portlet-info>
- </portlet>
-</portlet-app>
-
-
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<portlet-app
+ xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ version="2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
+ http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
+
+ <portlet>
+ <description>AboutPortletDescription</description>
+ <portlet-name>AboutPortlet</portlet-name>
+ <display-name>About Portlet</display-name>
+ <portlet-class>org.apache.pluto.driver.portlets.AboutPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
+ <portlet-mode>HELP</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>About Apache Pluto</title>
+ </portlet-info>
+ </portlet>
+
+ <portlet>
+ <description>AdminPortletDescription</description>
+ <portlet-name>AdminPortlet</portlet-name>
+ <display-name>Admin Portlet</display-name>
+ <portlet-class>org.apache.pluto.driver.portlets.AdminPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
+ <portlet-mode>HELP</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Apache Pluto Portal Admin</title>
+ </portlet-info>
+ </portlet>
+
+ <portlet>
+ <description>Used to administer pluto pages</description>
+ <portlet-name>PlutoPageAdmin</portlet-name>
+ <display-name>Pluto Page Administration Portlet</display-name>
+ <portlet-class>org.apache.pluto.driver.portlets.PageAdminPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>HELP</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Pluto Page Administrator</title>
+ </portlet-info>
+ </portlet>
+</portlet-app>
+
+
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/802dadb4/pluto-util/src/test/java/org/apache/pluto/util/assemble/file/FileAssemblerTest.java
----------------------------------------------------------------------
diff --git a/pluto-util/src/test/java/org/apache/pluto/util/assemble/file/FileAssemblerTest.java b/pluto-util/src/test/java/org/apache/pluto/util/assemble/file/FileAssemblerTest.java
index bbef8d1..f116d23 100644
--- a/pluto-util/src/test/java/org/apache/pluto/util/assemble/file/FileAssemblerTest.java
+++ b/pluto-util/src/test/java/org/apache/pluto/util/assemble/file/FileAssemblerTest.java
@@ -1,91 +1,119 @@
-/*
- * 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 org.apache.pluto.util.assemble.file;
-
-import java.io.File;
-import java.io.FileReader;
-import java.net.URL;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.pluto.util.assemble.AssemblerConfig;
-import org.apache.pluto.util.assemble.ResourceEntityResolver;
-import org.custommonkey.xmlunit.XMLTestCase;
-import org.custommonkey.xmlunit.XMLUnit;
-
-/**
- * @version $Revision$
- */
-public class FileAssemblerTest extends XMLTestCase {
-
- private File webXmlFile;
- private File portletXmlFile;
- private File assembledWebXmlFile;
-
- protected void setUp() throws Exception {
- XMLUnit.setIgnoreWhitespace(true);
- XMLUnit.setControlEntityResolver( new ResourceEntityResolver() );
- XMLUnit.setTestEntityResolver( new ResourceEntityResolver() );
-
- final URL webXmlUrl = this.getClass().getResource("/org/apache/pluto/util/assemble/file/web.xml");
- this.webXmlFile = new File(webXmlUrl.getFile());
-
- final URL portletXmlUrl = this.getClass().getResource("/org/apache/pluto/util/assemble/file/portlet.xml");
- this.portletXmlFile = new File(portletXmlUrl.getFile());
-
- final URL assembledWebXmlUrl = this.getClass().getResource("/org/apache/pluto/util/assemble/file/assembled.web.xml");
- this.assembledWebXmlFile = new File(assembledWebXmlUrl.getFile());
- }
-
- protected void tearDown() throws Exception {
- this.webXmlFile = null;
- this.portletXmlFile = null;
- }
-
- public void testAssembleToNewDirectory() throws Exception {
- AssemblerConfig config = new AssemblerConfig();
-
- final File webXmlFileDest = File.createTempFile(this.webXmlFile.getName() + ".", ".xml");
- webXmlFileDest.deleteOnExit();
-
- config.setWebappDescriptor(this.webXmlFile);
- config.setPortletDescriptor(this.portletXmlFile);
- config.setDestination(webXmlFileDest);
-
- FileAssembler assembler = new FileAssembler();
- assembler.assemble(config);
-
- assertXMLEqual(new FileReader(this.assembledWebXmlFile), new FileReader(webXmlFileDest));
- }
-
- public void testAssembleOverSelf() throws Exception {
- AssemblerConfig config = new AssemblerConfig();
-
- final File webXmlFileCopy = File.createTempFile(this.webXmlFile.getName() + ".", ".source.xml");
- webXmlFileCopy.deleteOnExit();
-
- FileUtils.copyFile(this.webXmlFile, webXmlFileCopy);
-
- config.setWebappDescriptor(webXmlFileCopy);
- config.setPortletDescriptor(this.portletXmlFile);
- config.setDestination(webXmlFileCopy);
-
- FileAssembler assembler = new FileAssembler();
- assembler.assemble(config);
-
- assertXMLEqual(new FileReader(this.assembledWebXmlFile), new FileReader(webXmlFileCopy));
- }
-}
+/*
+ * 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 org.apache.pluto.util.assemble.file;
+
+import java.io.File;
+import java.io.FileReader;
+import java.net.URL;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.pluto.util.assemble.AssemblerConfig;
+import org.apache.pluto.util.assemble.ResourceEntityResolver;
+import org.custommonkey.xmlunit.XMLTestCase;
+import org.custommonkey.xmlunit.XMLUnit;
+
+/**
+ * @version $Revision$
+ */
+public class FileAssemblerTest extends XMLTestCase {
+
+ private File webXmlFile;
+ private File web23XmlFile;
+ private File portletXmlFile;
+ private File portlet23XmlFile;
+ private File assembledWebXmlFile;
+ private File assembledWeb23XmlFile;
+
+ protected void setUp() throws Exception {
+ XMLUnit.setIgnoreWhitespace(true);
+ XMLUnit.setControlEntityResolver( new ResourceEntityResolver() );
+ XMLUnit.setTestEntityResolver( new ResourceEntityResolver() );
+
+ final URL webXmlUrl = this.getClass().getResource("/org/apache/pluto/util/assemble/file/web.xml");
+ this.webXmlFile = new File(webXmlUrl.getFile());
+
+ final URL web23XmlUrl = this.getClass().getResource("/org/apache/pluto/util/assemble/file/webServlet23.xml");
+ this.web23XmlFile = new File(web23XmlUrl.getFile());
+
+ final URL portletXmlUrl = this.getClass().getResource("/org/apache/pluto/util/assemble/file/portlet.xml");
+ this.portletXmlFile = new File(portletXmlUrl.getFile());
+
+ final URL portlet23XmlUrl = this.getClass().getResource("/org/apache/pluto/util/assemble/file/portletWebServlet23.xml");
+ this.portlet23XmlFile = new File(portlet23XmlUrl.getFile());
+
+ final URL assembledWebXmlUrl = this.getClass().getResource("/org/apache/pluto/util/assemble/file/assembled.web.xml");
+ this.assembledWebXmlFile = new File(assembledWebXmlUrl.getFile());
+
+ final URL assembledWeb23XmlUrl = this.getClass().getResource("/org/apache/pluto/util/assemble/file/assembled.webServlet23.xml");
+ this.assembledWeb23XmlFile = new File(assembledWeb23XmlUrl.getFile());
+ }
+
+ protected void tearDown() throws Exception {
+ this.webXmlFile = null;
+ this.portletXmlFile = null;
+ }
+
+ public void testAssembleToNewDirectory() throws Exception {
+ AssemblerConfig config = new AssemblerConfig();
+
+ final File webXmlFileDest = File.createTempFile(this.webXmlFile.getName() + ".", ".xml");
+ webXmlFileDest.deleteOnExit();
+
+ config.setWebappDescriptor(this.webXmlFile);
+ config.setPortletDescriptor(this.portletXmlFile);
+ config.setDestination(webXmlFileDest);
+
+ FileAssembler assembler = new FileAssembler();
+ assembler.assemble(config);
+
+ assertXMLEqual(new FileReader(this.assembledWebXmlFile), new FileReader(webXmlFileDest));
+ }
+
+ public void testAssembleWeb23ToNewDirectory() throws Exception {
+ AssemblerConfig config = new AssemblerConfig();
+
+ final File webXmlFileDest = File.createTempFile(this.web23XmlFile.getName() + ".", ".xml");
+ webXmlFileDest.deleteOnExit();
+
+ config.setWebappDescriptor(this.web23XmlFile);
+ config.setPortletDescriptor(this.portlet23XmlFile);
+ config.setDestination(webXmlFileDest);
+
+ FileAssembler assembler = new FileAssembler();
+ assembler.assemble(config);
+
+ assertXMLEqual(new FileReader(this.assembledWeb23XmlFile), new FileReader(webXmlFileDest));
+ }
+
+ public void testAssembleOverSelf() throws Exception {
+ AssemblerConfig config = new AssemblerConfig();
+
+ final File webXmlFileCopy = File.createTempFile(this.webXmlFile.getName() + ".", ".source.xml");
+ webXmlFileCopy.deleteOnExit();
+
+ FileUtils.copyFile(this.webXmlFile, webXmlFileCopy);
+
+ config.setWebappDescriptor(webXmlFileCopy);
+ config.setPortletDescriptor(this.portletXmlFile);
+ config.setDestination(webXmlFileCopy);
+
+ FileAssembler assembler = new FileAssembler();
+ assembler.assemble(config);
+
+ assertXMLEqual(new FileReader(this.assembledWebXmlFile), new FileReader(webXmlFileCopy));
+ }
+}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/802dadb4/pluto-util/src/test/resources/org/apache/pluto/util/assemble/file/assembled.webServlet23.xml
----------------------------------------------------------------------
diff --git a/pluto-util/src/test/resources/org/apache/pluto/util/assemble/file/assembled.webServlet23.xml b/pluto-util/src/test/resources/org/apache/pluto/util/assemble/file/assembled.webServlet23.xml
new file mode 100644
index 0000000..65830e3
--- /dev/null
+++ b/pluto-util/src/test/resources/org/apache/pluto/util/assemble/file/assembled.webServlet23.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+--><!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+
+ <display-name>Pluto Testsuite</display-name>
+
+ <context-param>
+ <param-name>test-parameter-name</param-name>
+ <param-value>test-parameter-val</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>parameter-name</param-name>
+ <param-value>parameter-value</param-value>
+ </context-param>
+
+ <!-- Companion Servlet Definitions ======================================= -->
+
+ <servlet>
+ <servlet-name>ExternalAppScopedAttributeTest_Servlet</servlet-name>
+ <servlet-class>org.apache.pluto.testsuite.test.ExternalAppScopedAttributeTest$CompanionServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>DispatcherRenderParameterTest_Servlet</servlet-name>
+ <servlet-class>org.apache.pluto.testsuite.test.DispatcherRenderParameterTest$CompanionServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>DispatcherRequestTest_Servlet</servlet-name>
+ <servlet-class>org.apache.pluto.testsuite.test.DispatcherRequestTest$CompanionServlet</servlet-class>
+ </servlet>
+<servlet>
+<servlet-name>TestPortlet1</servlet-name>
+<servlet-class>org.apache.pluto.container.driver.PortletServlet</servlet-class>
+<init-param>
+<param-name>portlet-name</param-name>
+<param-value>TestPortlet1</param-value>
+</init-param>
+<load-on-startup>1</load-on-startup>
+</servlet>
+<servlet>
+<servlet-name>TestPortlet2</servlet-name>
+<servlet-class>org.apache.pluto.container.driver.PortletServlet</servlet-class>
+<init-param>
+<param-name>portlet-name</param-name>
+<param-value>TestPortlet2</param-value>
+</init-param>
+<load-on-startup>1</load-on-startup>
+</servlet>
+<servlet>
+<servlet-name>286TestPortlet</servlet-name>
+<servlet-class>org.apache.pluto.container.driver.PortletServlet</servlet-class>
+<init-param>
+<param-name>portlet-name</param-name>
+<param-value>286TestPortlet</param-value>
+</init-param>
+<load-on-startup>1</load-on-startup>
+</servlet>
+<servlet>
+<servlet-name>286TestCompanionPortlet</servlet-name>
+<servlet-class>org.apache.pluto.container.driver.PortletServlet</servlet-class>
+<init-param>
+<param-name>portlet-name</param-name>
+<param-value>286TestCompanionPortlet</param-value>
+</init-param>
+<load-on-startup>1</load-on-startup>
+</servlet>
+
+
+ <!-- Companion Servlet Mappings ========================================== -->
+
+ <servlet-mapping>
+ <servlet-name>ExternalAppScopedAttributeTest_Servlet</servlet-name>
+ <url-pattern>/test/ExternalAppScopedAttributeTest_Servlet</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>DispatcherRenderParameterTest_Servlet</servlet-name>
+ <url-pattern>/test/DispatcherRenderParameterTest_Servlet</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>DispatcherRequestTest_Servlet</servlet-name>
+ <url-pattern>/test/DispatcherRequestTest_Servlet/*</url-pattern>
+ </servlet-mapping>
+<servlet-mapping>
+<servlet-name>TestPortlet1</servlet-name>
+<url-pattern>/PlutoInvoker/TestPortlet1</url-pattern>
+</servlet-mapping>
+<servlet-mapping>
+<servlet-name>TestPortlet2</servlet-name>
+<url-pattern>/PlutoInvoker/TestPortlet2</url-pattern>
+</servlet-mapping>
+<servlet-mapping>
+<servlet-name>286TestPortlet</servlet-name>
+<url-pattern>/PlutoInvoker/286TestPortlet</url-pattern>
+</servlet-mapping>
+<servlet-mapping>
+<servlet-name>286TestCompanionPortlet</servlet-name>
+<url-pattern>/PlutoInvoker/286TestCompanionPortlet</url-pattern>
+</servlet-mapping>
+
+ <security-role>
+ <role-name>tomcat</role-name>
+ </security-role>
+
+</web-app>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/802dadb4/pluto-util/src/test/resources/org/apache/pluto/util/assemble/file/portletWebServlet23.xml
----------------------------------------------------------------------
diff --git a/pluto-util/src/test/resources/org/apache/pluto/util/assemble/file/portletWebServlet23.xml b/pluto-util/src/test/resources/org/apache/pluto/util/assemble/file/portletWebServlet23.xml
new file mode 100644
index 0000000..48ef23f
--- /dev/null
+++ b/pluto-util/src/test/resources/org/apache/pluto/util/assemble/file/portletWebServlet23.xml
@@ -0,0 +1,325 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<!-- FIXME: schema location points to temp location of portlet spec -->
+<portlet-app
+ xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
+ http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
+
+ <!-- Test Portlet #1 ===================================================== -->
+
+ <portlet>
+
+ <description>TestSuiteDescription</description>
+ <portlet-name>TestPortlet1</portlet-name>
+ <display-name>Test Portlet #1</display-name>
+ <portlet-class>org.apache.pluto.testsuite.TestPortlet</portlet-class>
+
+ <init-param>
+ <name>config</name>
+ <value>/WEB-INF/testsuite-config.xml</value>
+ </init-param>
+ <init-param>
+ <name>dummyName</name>
+ <value>dummyValue</value>
+ </init-param>
+
+ <expiration-cache>-1</expiration-cache>
+
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
+ <portlet-mode>HELP</portlet-mode>
+ </supports>
+
+ <supported-locale>en</supported-locale>
+ <supported-locale>de</supported-locale>
+
+ <portlet-info>
+ <title>Test Portlet #1</title>
+ <short-title>Test #1</short-title>
+ <keywords>Test,Testing</keywords>
+ </portlet-info>
+
+ <portlet-preferences>
+ <preference>
+ <name>dummyName</name>
+ <value>dummyValue</value>
+ <read-only>false</read-only>
+ </preference>
+ <preference>
+ <name>dummyName2</name>
+ <value>dummyValue2</value>
+ </preference>
+ <preference>
+ <name>readonly</name>
+ <value>readonly</value>
+ <read-only>true</read-only>
+ </preference>
+ <preference>
+ <name>nameWithNoValue</name>
+ </preference>
+ <preferences-validator>org.apache.pluto.testsuite.validator.PreferencesValidatorImpl</preferences-validator>
+ </portlet-preferences>
+
+ <security-role-ref>
+ <role-name>plutoTestRole</role-name>
+ <role-link>tomcat</role-link>
+ </security-role-ref>
+
+ </portlet>
+
+
+
+ <!-- Test Portlet #2 ===================================================== -->
+
+ <portlet>
+
+ <description>TestSuiteDescription</description>
+ <portlet-name>TestPortlet2</portlet-name>
+ <display-name>Test Portlet #2</display-name>
+ <portlet-class>org.apache.pluto.testsuite.TestPortlet</portlet-class>
+
+ <init-param>
+ <name>config</name>
+ <value>/WEB-INF/testsuite-2-config.xml</value>
+ </init-param>
+ <init-param>
+ <name>dummyName</name>
+ <value>dummyValue</value>
+ </init-param>
+
+ <expiration-cache>-1</expiration-cache>
+
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
+ <portlet-mode>HELP</portlet-mode>
+ </supports>
+
+ <supported-locale>en</supported-locale>
+ <supported-locale>de</supported-locale>
+ <resource-bundle>TestPortlet</resource-bundle>
+
+ <portlet-preferences >
+ <preference>
+ <name>dummyName</name>
+ <value>dummyValue</value>
+ <read-only>false</read-only>
+ </preference>
+ <preference>
+ <name>dummyName2</name>
+ <value>dummyValue2</value>
+ </preference>
+ <preference>
+ <name>readonly</name>
+ <value>readonly</value>
+ <read-only>true</read-only>
+ </preference>
+ <preference>
+ <name>nameWithNoValue</name>
+ </preference>
+ <preferences-validator>org.apache.pluto.testsuite.validator.PreferencesValidatorImpl2</preferences-validator>
+ </portlet-preferences>
+
+ <security-role-ref>
+ <role-name>plutoTestRole</role-name>
+ <role-link>tomcat</role-link>
+ </security-role-ref>
+
+ </portlet>
+
+ <!-- JSR 286 Compatibility Test Portlet -->
+
+ <portlet>
+
+ <description>JSR 286 Compatibility Tests</description>
+ <portlet-name>286TestPortlet</portlet-name>
+ <display-name>JSR 286 Test Portlet</display-name>
+ <portlet-class>org.apache.pluto.testsuite.TestPortlet</portlet-class>
+
+ <init-param>
+ <name>config</name>
+ <value>/WEB-INF/testsuite-286-config.xml</value>
+ </init-param>
+
+ <expiration-cache>-1</expiration-cache>
+
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
+ <portlet-mode>HELP</portlet-mode>
+ </supports>
+
+ <portlet-info>
+ <title>286 Test Portlet</title>
+ <short-title>286 Tests</short-title>
+ <keywords>JSR 286,Tests</keywords>
+ </portlet-info>
+
+ <supported-processing-event>
+ <name>trigger-event-phase</name>
+ </supported-processing-event>
+
+ <supported-processing-event>
+ <name>event-with-complex-value</name>
+ </supported-processing-event>
+
+ <supported-processing-event>
+ <name>event-with-simple-value</name>
+ </supported-processing-event>
+
+ <supported-publishing-event>
+ <name>trigger-event-phase</name>
+ </supported-publishing-event>
+
+ <supported-publishing-event>
+ <name>event-with-simple-value</name>
+ </supported-publishing-event>
+
+ <supported-publishing-event>
+ <name>event-with-complex-value</name>
+ </supported-publishing-event>
+
+ <supported-publishing-event>
+ <qname xmlns:pluto="http://portals.apache.org/pluto/altns">event-with-qname</qname>
+ </supported-publishing-event>
+
+ <supported-public-render-parameter>public-render-param1</supported-public-render-parameter>
+
+ </portlet>
+
+ <portlet>
+
+ <description>JSR 286 Test Portlet Companion</description>
+ <portlet-name>286TestCompanionPortlet</portlet-name>
+ <portlet-class>
+ org.apache.pluto.testsuite.test.jsr286.TestCompanionPortlet
+ </portlet-class>
+
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+
+ <portlet-info>
+ <title>286 Test Portlet Companion</title>
+ <short-title>286 Test Companion</short-title>
+ <keywords>JSR 286,Tests</keywords>
+ </portlet-info>
+
+ <supported-processing-event>
+ <name>event-with-simple-value</name>
+ </supported-processing-event>
+
+ <supported-processing-event>
+ <name>event-with-complex-value</name>
+ </supported-processing-event>
+
+ <supported-processing-event>
+ <qname xmlns:pluto="http://portals.apache.org/pluto/altns">event-with-qname</qname>
+ </supported-processing-event>
+
+ <supported-public-render-parameter>public-render-param1</supported-public-render-parameter>
+
+ </portlet>
+
+ <filter>
+
+ <description>
+ This filter should be applied both the JSR 286
+ test portlet as well as its helper portlet.
+ </description>
+
+ <display-name>Wildcard Mapped Filter</display-name>
+
+ <filter-name>WildcardMappedFilter</filter-name>
+ <filter-class>org.apache.pluto.testsuite.test.jsr286.filter.WildcardMappedFilter</filter-class>
+
+ <lifecycle>ACTION_PHASE</lifecycle>
+ <lifecycle>RENDER_PHASE</lifecycle>
+ <lifecycle>EVENT_PHASE</lifecycle>
+ <lifecycle>RESOURCE_PHASE</lifecycle>
+
+ </filter>
+
+ <filter>
+
+ <description>
+ This filter implements portlet filter methods for all four
+ lifecycle phases and is used in the various portlet filter tests.
+ </description>
+
+ <display-name>Test Portlet Filter</display-name>
+
+ <filter-name>TestFilter</filter-name>
+ <filter-class>org.apache.pluto.testsuite.test.jsr286.filter.TestFilter</filter-class>
+
+ <lifecycle>ACTION_PHASE</lifecycle>
+ <lifecycle>RENDER_PHASE</lifecycle>
+ <lifecycle>EVENT_PHASE</lifecycle>
+ <lifecycle>RESOURCE_PHASE</lifecycle>
+
+ </filter>
+
+ <filter-mapping>
+ <filter-name>WildcardMappedFilter</filter-name>
+ <portlet-name>286*</portlet-name>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>TestFilter</filter-name>
+ <portlet-name>286TestPortlet</portlet-name>
+ </filter-mapping>
+
+ <!-- JSR 286 Portlet Coordination Definitions -->
+
+ <default-namespace>http://portals.apache.org/pluto/testsuite</default-namespace>
+
+ <event-definition>
+ <name>trigger-event-phase</name>
+ <value-type>java.lang.String</value-type>
+ </event-definition>
+
+ <event-definition>
+ <name>event-with-simple-value</name>
+ <value-type>java.lang.String</value-type>
+ </event-definition>
+
+ <event-definition>
+ <name>event-with-complex-value</name>
+ <value-type>org.apache.pluto.testsuite.test.jsr286.event.ComposedObject</value-type>
+ </event-definition>
+
+ <event-definition>
+ <qname xmlns:pluto="http://portals.apache.org/pluto/altns">event-with-qname</qname>
+ <value-type>java.lang.Integer</value-type>
+ </event-definition>
+
+ <public-render-parameter>
+ <identifier>public-render-param1</identifier>
+ <qname xmlns:pluto="http://portals.apache.org/pluto/altns">public-render-param1</qname>
+ </public-render-parameter>
+
+</portlet-app>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/802dadb4/pluto-util/src/test/resources/org/apache/pluto/util/assemble/file/webServlet23.xml
----------------------------------------------------------------------
diff --git a/pluto-util/src/test/resources/org/apache/pluto/util/assemble/file/webServlet23.xml b/pluto-util/src/test/resources/org/apache/pluto/util/assemble/file/webServlet23.xml
new file mode 100644
index 0000000..f3eefa2
--- /dev/null
+++ b/pluto-util/src/test/resources/org/apache/pluto/util/assemble/file/webServlet23.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<!--
+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.
+-->
+<web-app>
+
+ <display-name>Pluto Testsuite</display-name>
+
+ <context-param>
+ <param-name>test-parameter-name</param-name>
+ <param-value>test-parameter-val</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>parameter-name</param-name>
+ <param-value>parameter-value</param-value>
+ </context-param>
+
+ <!-- Companion Servlet Definitions ======================================= -->
+
+ <servlet>
+ <servlet-name>ExternalAppScopedAttributeTest_Servlet</servlet-name>
+ <servlet-class>org.apache.pluto.testsuite.test.ExternalAppScopedAttributeTest$CompanionServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>DispatcherRenderParameterTest_Servlet</servlet-name>
+ <servlet-class>org.apache.pluto.testsuite.test.DispatcherRenderParameterTest$CompanionServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>DispatcherRequestTest_Servlet</servlet-name>
+ <servlet-class>org.apache.pluto.testsuite.test.DispatcherRequestTest$CompanionServlet</servlet-class>
+ </servlet>
+
+
+ <!-- Companion Servlet Mappings ========================================== -->
+
+ <servlet-mapping>
+ <servlet-name>ExternalAppScopedAttributeTest_Servlet</servlet-name>
+ <url-pattern>/test/ExternalAppScopedAttributeTest_Servlet</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>DispatcherRenderParameterTest_Servlet</servlet-name>
+ <url-pattern>/test/DispatcherRenderParameterTest_Servlet</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>DispatcherRequestTest_Servlet</servlet-name>
+ <url-pattern>/test/DispatcherRequestTest_Servlet/*</url-pattern>
+ </servlet-mapping>
+
+ <security-role>
+ <role-name>tomcat</role-name>
+ </security-role>
+
+</web-app>
+