gatein SVN: r5757 - in components/pc/trunk/test/servers: jboss51 and 3 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-01-14 20:21:08 -0500 (Fri, 14 Jan 2011)
New Revision: 5757
Modified:
components/pc/trunk/test/servers/jboss42/pom.xml
components/pc/trunk/test/servers/jboss51/pom.xml
components/pc/trunk/test/servers/jetty6/pom.xml
components/pc/trunk/test/servers/tomcat6/pom.xml
components/pc/trunk/test/servers/tomcat7/pom.xml
Log:
GTNPC-46 : now use "test" phase instead of "integration-test" phase
Modified: components/pc/trunk/test/servers/jboss42/pom.xml
===================================================================
--- components/pc/trunk/test/servers/jboss42/pom.xml 2011-01-15 01:01:44 UTC (rev 5756)
+++ components/pc/trunk/test/servers/jboss42/pom.xml 2011-01-15 01:21:08 UTC (rev 5757)
@@ -335,7 +335,7 @@
<executions>
<execution>
<id>test</id>
- <phase>integration-test</phase>
+ <phase>test</phase>
<configuration>
<tasks>
Modified: components/pc/trunk/test/servers/jboss51/pom.xml
===================================================================
--- components/pc/trunk/test/servers/jboss51/pom.xml 2011-01-15 01:01:44 UTC (rev 5756)
+++ components/pc/trunk/test/servers/jboss51/pom.xml 2011-01-15 01:21:08 UTC (rev 5757)
@@ -341,7 +341,7 @@
<executions>
<execution>
<id>test</id>
- <phase>integration-test</phase>
+ <phase>test</phase>
<configuration>
<tasks>
Modified: components/pc/trunk/test/servers/jetty6/pom.xml
===================================================================
--- components/pc/trunk/test/servers/jetty6/pom.xml 2011-01-15 01:01:44 UTC (rev 5756)
+++ components/pc/trunk/test/servers/jetty6/pom.xml 2011-01-15 01:21:08 UTC (rev 5757)
@@ -341,7 +341,7 @@
<executions>
<execution>
<id>test</id>
- <phase>integration-test</phase>
+ <phase>test</phase>
<configuration>
<tasks>
Modified: components/pc/trunk/test/servers/tomcat6/pom.xml
===================================================================
--- components/pc/trunk/test/servers/tomcat6/pom.xml 2011-01-15 01:01:44 UTC (rev 5756)
+++ components/pc/trunk/test/servers/tomcat6/pom.xml 2011-01-15 01:21:08 UTC (rev 5757)
@@ -335,7 +335,7 @@
<executions>
<execution>
<id>test</id>
- <phase>integration-test</phase>
+ <phase>test</phase>
<configuration>
<tasks>
Modified: components/pc/trunk/test/servers/tomcat7/pom.xml
===================================================================
--- components/pc/trunk/test/servers/tomcat7/pom.xml 2011-01-15 01:01:44 UTC (rev 5756)
+++ components/pc/trunk/test/servers/tomcat7/pom.xml 2011-01-15 01:21:08 UTC (rev 5757)
@@ -335,7 +335,7 @@
<executions>
<execution>
<id>test</id>
- <phase>integration-test</phase>
+ <phase>test</phase>
<configuration>
<tasks>
13 years, 4 months
gatein SVN: r5756 - components/pc/trunk/test/servers/jetty6.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-01-14 20:01:44 -0500 (Fri, 14 Jan 2011)
New Revision: 5756
Modified:
components/pc/trunk/test/servers/jetty6/
Log:
svn ignore for jetty test dir
Property changes on: components/pc/trunk/test/servers/jetty6
___________________________________________________________________
Name: svn:ignore
+ *.iml
target
13 years, 4 months
gatein SVN: r5755 - components/pc/trunk/test/servers.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-01-14 19:42:51 -0500 (Fri, 14 Jan 2011)
New Revision: 5755
Modified:
components/pc/trunk/test/servers/pom.xml
Log:
now make jetty as part of the default servers
Modified: components/pc/trunk/test/servers/pom.xml
===================================================================
--- components/pc/trunk/test/servers/pom.xml 2011-01-15 00:11:15 UTC (rev 5754)
+++ components/pc/trunk/test/servers/pom.xml 2011-01-15 00:42:51 UTC (rev 5755)
@@ -66,8 +66,8 @@
<modules>
<module>tomcat6</module>
<module>tomcat7</module>
- <module>jboss42</module>
<module>jboss51</module>
+ <module>jetty6</module>
</modules>
</profile>
<profile>
13 years, 4 months
gatein SVN: r5754 - in components/pc/trunk/test/servers/jetty6/src/test: resources/config/jetty and 1 other directory.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-01-14 19:11:15 -0500 (Fri, 14 Jan 2011)
New Revision: 5754
Added:
components/pc/trunk/test/servers/jetty6/src/test/resources/config/jetty/webdefault.xml
Modified:
components/pc/trunk/test/servers/jetty6/src/test/build.xml
Log:
GTNPC-53 : https://issues.jboss.org/browse/GTNPC-53
Modified: components/pc/trunk/test/servers/jetty6/src/test/build.xml
===================================================================
--- components/pc/trunk/test/servers/jetty6/src/test/build.xml 2011-01-14 23:48:47 UTC (rev 5753)
+++ components/pc/trunk/test/servers/jetty6/src/test/build.xml 2011-01-15 00:11:15 UTC (rev 5754)
@@ -93,6 +93,7 @@
<property name="cargo.jvmargs" value="-Duser.language=en ${cargo.debug}"/>
<configfile file="${basedir}/src/test/resources/config/jetty/jetty.xml" todir="etc"/>
<configfile file="${basedir}/src/test/resources/config/jetty/realm.properties" todir="etc"/>
+ <configfile file="${basedir}/src/test/resources/config/jetty/webdefault.xml" todir="etc"/>
<deployable type="war" file="${org.codehaus.cargo:cargo-jetty-deployer:war}">
<property name="context" value="cargo-jetty-deployer"/>
</deployable>
Added: components/pc/trunk/test/servers/jetty6/src/test/resources/config/jetty/webdefault.xml
===================================================================
--- components/pc/trunk/test/servers/jetty6/src/test/resources/config/jetty/webdefault.xml (rev 0)
+++ components/pc/trunk/test/servers/jetty6/src/test/resources/config/jetty/webdefault.xml 2011-01-15 00:11:15 UTC (rev 5754)
@@ -0,0 +1,419 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!-- ===================================================================== -->
+<!-- This file contains the default descriptor for web applications. -->
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+<!-- The intent of this descriptor is to include jetty specific or common -->
+<!-- configuration for all webapps. If a context has a webdefault.xml -->
+<!-- descriptor, it is applied before the contexts own web.xml file -->
+<!-- -->
+<!-- A context may be assigned a default descriptor by: -->
+<!-- + Calling WebApplicationContext.setDefaultsDescriptor -->
+<!-- + Passed an arg to addWebApplications -->
+<!-- -->
+<!-- This file is used both as the resource within the jetty.jar (which is -->
+<!-- used as the default if no explicit defaults descriptor is set) and it -->
+<!-- is copied to the etc directory of the Jetty distro and explicitly -->
+<!-- by the jetty.xml file. -->
+<!-- -->
+<!-- ===================================================================== -->
+<web-app
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ metadata-complete="true"
+ version="2.5">
+
+ <description>
+ Default web.xml file.
+ This file is applied to a Web application before it's own WEB_INF/web.xml file
+ </description>
+
+
+ <!-- ==================================================================== -->
+ <!-- Context params to control Session Cookies -->
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <!-- UNCOMMENT TO ACTIVATE -->
+<!--
+ <context-param>
+ <param-name>org.mortbay.jetty.servlet.SessionDomain</param-name>
+ <param-value>127.0.0.1</param-value>
+ </context-param>
+-->
+
+
+
+ <context-param>
+ <param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
+ <param-value>/</param-value>
+ </context-param>
+
+<!--
+ <context-param>
+ <param-name>org.mortbay.jetty.servlet.MaxAge</param-name>
+ <param-value>-1</param-value>
+ </context-param>
+-->
+
+ <!-- control which jars from the container's classpath will be scanned for .tlds -->
+ <context-param>
+ <param-name>org.mortbay.jetty.webapp.ContainerIncludeTLDJarPattern</param-name>
+ <param-value>jsp-api-.*\.jar|jsp-.*\.jar</param-value>
+ </context-param>
+
+ <!-- control which jars from the container's classpath will be scanned for -->
+ <!-- annotations. If this property is empty, NO JARS from the container -->
+ <!-- classpath will be scanned. This can be overridden by a webapp by -->
+ <!-- defining this context-param in their web.xml file. Individual webapps -->
+ <!-- can also control which jars in their WEB-INF/lib will be scanned by -->
+ <!-- setting a context-param in web.xml called: -->
+ <!-- org.mortbay.jetty.webapp.WebInfIncludeAnnotationPattern -->
+ <context-param>
+ <param-name>org.mortbay.jetty.webapp.ContainerIncludeAnnotationJarPattern</param-name>
+ <param-value></param-value>
+ </context-param>
+
+
+ <!-- ==================================================================== -->
+ <!-- The default servlet. -->
+ <!-- This servlet, normally mapped to /, provides the handling for static -->
+ <!-- content, OPTIONS and TRACE methods for the context. -->
+ <!-- The following initParameters are supported: -->
+ <!-- -->
+ <!-- acceptRanges If true, range requests and responses are -->
+ <!-- supported -->
+ <!-- -->
+ <!-- dirAllowed If true, directory listings are returned if no -->
+ <!-- welcome file is found. Else 403 Forbidden. -->
+ <!-- -->
+ <!-- redirectWelcome If true, redirect welcome file requests -->
+ <!-- else use request dispatcher forwards -->
+ <!-- -->
+ <!-- gzip If set to true, then static content will be served-->
+ <!-- as gzip content encoded if a matching resource is -->
+ <!-- found ending with ".gz" -->
+ <!-- -->
+ <!-- resoureBase Can be set to replace the context resource base -->
+ <!-- -->
+ <!-- relativeResourceBase -->
+ <!-- Set with a pathname relative to the base of the -->
+ <!-- servlet context root. Useful for only serving -->
+ <!-- static content from only specific subdirectories. -->
+ <!-- -->
+ <!-- useFileMappedBuffer -->
+ <!-- If set to true (the default), a memory mapped -->
+ <!-- file buffer will be used to serve static content -->
+ <!-- when using an NIO connector. Setting this value -->
+ <!-- to false means that a direct buffer will be used -->
+ <!-- instead. If you are having trouble with Windows -->
+ <!-- file locking, set this to false. -->
+ <!-- -->
+ <!-- cacheControl If set, all static content will have this value -->
+ <!-- set as the cache-control header. -->
+ <!-- -->
+ <!-- maxCacheSize Maximum size of the static resource cache -->
+ <!-- -->
+ <!-- maxCachedFileSize Maximum size of any single file in the cache -->
+ <!-- -->
+ <!-- maxCachedFiles Maximum number of files in the cache -->
+ <!-- -->
+ <!-- cacheType "nio", "bio" or "both" to determine the type(s) -->
+ <!-- of resource cache. A bio cached buffer may be used-->
+ <!-- by nio but is not as efficient as a nio buffer. -->
+ <!-- An nio cached buffer may not be used by bio. -->
+ <!-- -->
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <servlet>
+ <servlet-name>default</servlet-name>
+ <servlet-class>org.mortbay.jetty.servlet.DefaultServlet</servlet-class>
+ <init-param>
+ <param-name>acceptRanges</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>dirAllowed</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>redirectWelcome</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ <init-param>
+ <param-name>maxCacheSize</param-name>
+ <param-value>256000000</param-value>
+ </init-param>
+ <init-param>
+ <param-name>maxCachedFileSize</param-name>
+ <param-value>10000000</param-value>
+ </init-param>
+ <init-param>
+ <param-name>maxCachedFiles</param-name>
+ <param-value>1000</param-value>
+ </init-param>
+ <init-param>
+ <param-name>cacheType</param-name>
+ <param-value>both</param-value>
+ </init-param>
+ <init-param>
+ <param-name>gzip</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>useFileMappedBuffer</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <!--
+ <init-param>
+ <param-name>cacheControl</param-name>
+ <param-value>max-age=3600,public</param-value>
+ </init-param>
+ -->
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
+
+
+ <!-- ==================================================================== -->
+ <!-- JSP Servlet -->
+ <!-- This is the jasper JSP servlet from the jakarta project -->
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <!-- The JSP page compiler and execution servlet, which is the mechanism -->
+ <!-- used by Glassfish to support JSP pages. Traditionally, this servlet -->
+ <!-- is mapped to URL patterh "*.jsp". This servlet supports the -->
+ <!-- following initialization parameters (default values are in square -->
+ <!-- brackets): -->
+ <!-- -->
+ <!-- checkInterval If development is false and reloading is true, -->
+ <!-- background compiles are enabled. checkInterval -->
+ <!-- is the time in seconds between checks to see -->
+ <!-- if a JSP page needs to be recompiled. [300] -->
+ <!-- -->
+ <!-- compiler Which compiler Ant should use to compile JSP -->
+ <!-- pages. See the Ant documenation for more -->
+ <!-- information. [javac] -->
+ <!-- -->
+ <!-- classdebuginfo Should the class file be compiled with -->
+ <!-- debugging information? [true] -->
+ <!-- -->
+ <!-- classpath What class path should I use while compiling -->
+ <!-- generated servlets? [Created dynamically -->
+ <!-- based on the current web application] -->
+ <!-- Set to ? to make the container explicitly set -->
+ <!-- this parameter. -->
+ <!-- -->
+ <!-- development Is Jasper used in development mode (will check -->
+ <!-- for JSP modification on every access)? [true] -->
+ <!-- -->
+ <!-- enablePooling Determines whether tag handler pooling is -->
+ <!-- enabled [true] -->
+ <!-- -->
+ <!-- fork Tell Ant to fork compiles of JSP pages so that -->
+ <!-- a separate JVM is used for JSP page compiles -->
+ <!-- from the one Tomcat is running in. [true] -->
+ <!-- -->
+ <!-- ieClassId The class-id value to be sent to Internet -->
+ <!-- Explorer when using <jsp:plugin> tags. -->
+ <!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->
+ <!-- -->
+ <!-- javaEncoding Java file encoding to use for generating java -->
+ <!-- source files. [UTF-8] -->
+ <!-- -->
+ <!-- keepgenerated Should we keep the generated Java source code -->
+ <!-- for each page instead of deleting it? [true] -->
+ <!-- -->
+ <!-- logVerbosityLevel The level of detailed messages to be produced -->
+ <!-- by this servlet. Increasing levels cause the -->
+ <!-- generation of more messages. Valid values are -->
+ <!-- FATAL, ERROR, WARNING, INFORMATION, and DEBUG. -->
+ <!-- [WARNING] -->
+ <!-- -->
+ <!-- mappedfile Should we generate static content with one -->
+ <!-- print statement per input line, to ease -->
+ <!-- debugging? [false] -->
+ <!-- -->
+ <!-- -->
+ <!-- reloading Should Jasper check for modified JSPs? [true] -->
+ <!-- -->
+ <!-- suppressSmap Should the generation of SMAP info for JSR45 -->
+ <!-- debugging be suppressed? [false] -->
+ <!-- -->
+ <!-- dumpSmap Should the SMAP info for JSR45 debugging be -->
+ <!-- dumped to a file? [false] -->
+ <!-- False if suppressSmap is true -->
+ <!-- -->
+ <!-- scratchdir What scratch directory should we use when -->
+ <!-- compiling JSP pages? [default work directory -->
+ <!-- for the current web application] -->
+ <!-- -->
+ <!-- tagpoolMaxSize The maximum tag handler pool size [5] -->
+ <!-- -->
+ <!-- xpoweredBy Determines whether X-Powered-By response -->
+ <!-- header is added by generated servlet [false] -->
+ <!-- -->
+ <!-- If you wish to use Jikes to compile JSP pages: -->
+ <!-- Set the init parameter "compiler" to "jikes". Define -->
+ <!-- the property "-Dbuild.compiler.emacs=true" when starting Jetty -->
+ <!-- to cause Jikes to emit error messages in a format compatible with -->
+ <!-- Jasper. -->
+ <!-- If you get an error reporting that jikes can't use UTF-8 encoding, -->
+ <!-- try setting the init parameter "javaEncoding" to "ISO-8859-1". -->
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <servlet id="jsp">
+ <servlet-name>jsp</servlet-name>
+ <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
+ <init-param>
+ <param-name>logVerbosityLevel</param-name>
+ <param-value>DEBUG</param-value>
+ </init-param>
+ <init-param>
+ <param-name>fork</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ <init-param>
+ <param-name>xpoweredBy</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ <!--
+ <init-param>
+ <param-name>classpath</param-name>
+ <param-value>?</param-value>
+ </init-param>
+ -->
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>jsp</servlet-name>
+ <url-pattern>*.jsp</url-pattern>
+ <url-pattern>*.jspf</url-pattern>
+ <url-pattern>*.jspx</url-pattern>
+ <url-pattern>*.xsp</url-pattern>
+ <url-pattern>*.JSP</url-pattern>
+ <url-pattern>*.JSPF</url-pattern>
+ <url-pattern>*.JSPX</url-pattern>
+ <url-pattern>*.XSP</url-pattern>
+ </servlet-mapping>
+
+ <!-- ==================================================================== -->
+ <!-- Dynamic Servlet Invoker. -->
+ <!-- This servlet invokes anonymous servlets that have not been defined -->
+ <!-- in the web.xml or by other means. The first element of the pathInfo -->
+ <!-- of a request passed to the envoker is treated as a servlet name for -->
+ <!-- an existing servlet, or as a class name of a new servlet. -->
+ <!-- This servlet is normally mapped to /servlet/* -->
+ <!-- This servlet support the following initParams: -->
+ <!-- -->
+ <!-- nonContextServlets If false, the invoker can only load -->
+ <!-- servlets from the contexts classloader. -->
+ <!-- This is false by default and setting this -->
+ <!-- to true may have security implications. -->
+ <!-- -->
+ <!-- verbose If true, log dynamic loads -->
+ <!-- -->
+ <!-- * All other parameters are copied to the -->
+ <!-- each dynamic servlet as init parameters -->
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <!-- Uncomment for dynamic invocation
+ <servlet>
+ <servlet-name>invoker</servlet-name>
+ <servlet-class>org.mortbay.jetty.servlet.Invoker</servlet-class>
+ <init-param>
+ <param-name>verbose</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ <init-param>
+ <param-name>nonContextServlets</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ <init-param>
+ <param-name>dynamicParam</param-name>
+ <param-value>anyValue</param-value>
+ </init-param>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping> <servlet-name>invoker</servlet-name> <url-pattern>/servlet/*</url-pattern> </servlet-mapping>
+ -->
+
+
+
+ <!-- ==================================================================== -->
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
+
+ <!-- ==================================================================== -->
+ <!-- Default MIME mappings -->
+ <!-- The default MIME mappings are provided by the mime.properties -->
+ <!-- resource in the org.mortbay.jetty.jar file. Additional or modified -->
+ <!-- mappings may be specified here -->
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <!-- UNCOMMENT TO ACTIVATE
+ <mime-mapping>
+ <extension>mysuffix</extension>
+ <mime-type>mymime/type</mime-type>
+ </mime-mapping>
+ -->
+
+ <!-- ==================================================================== -->
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+
+ <!-- ==================================================================== -->
+ <locale-encoding-mapping-list>
+ <locale-encoding-mapping><locale>ar</locale><encoding>ISO-8859-6</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>be</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>bg</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>ca</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>cs</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>da</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>de</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>el</locale><encoding>ISO-8859-7</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>en</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>es</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>et</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>fi</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>fr</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>hr</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>hu</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>is</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>it</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>iw</locale><encoding>ISO-8859-8</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>ja</locale><encoding>Shift_JIS</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>ko</locale><encoding>EUC-KR</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>lt</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>lv</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>mk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>nl</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>no</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>pl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>pt</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>ro</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>ru</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>sh</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>sk</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>sl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>sq</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>sr</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>sv</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>tr</locale><encoding>ISO-8859-9</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>uk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>zh</locale><encoding>GB2312</encoding></locale-encoding-mapping>
+ <locale-encoding-mapping><locale>zh_TW</locale><encoding>Big5</encoding></locale-encoding-mapping>
+ </locale-encoding-mapping-list>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Disable TRACE</web-resource-name>
+ <url-pattern>/</url-pattern>
+ <http-method>TRACE</http-method>
+ </web-resource-collection>
+ <auth-constraint/>
+ </security-constraint>
+
+</web-app>
+
13 years, 4 months
gatein SVN: r5753 - components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/jsr168/api.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-01-14 18:48:47 -0500 (Fri, 14 Jan 2011)
New Revision: 5753
Modified:
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/jsr168/api/PortletContextImpl.java
Log:
GTNPC-52 : PortletContext setAttribute should throw an IAE when the name argument is null
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/jsr168/api/PortletContextImpl.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/jsr168/api/PortletContextImpl.java 2011-01-14 23:34:05 UTC (rev 5752)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/jsr168/api/PortletContextImpl.java 2011-01-14 23:48:47 UTC (rev 5753)
@@ -126,7 +126,7 @@
public Set<String> getResourcePaths(String s)
{
Set<String> paths = (Set<String>)servletContext.getResourcePaths(s);
- // Some container (jetty) may return an empty set instead of null
+ // Some container (jetty) may return an empty set instead of null
return (paths == null || paths.isEmpty()) ? null : paths;
}
@@ -188,6 +188,10 @@
public void setAttribute(String s, Object o)
{
+ if (s == null)
+ {
+ throw new IllegalArgumentException("attribute name must not be null");
+ }
servletContext.setAttribute(s, o);
}
13 years, 4 months
gatein SVN: r5752 - components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/jsr168/api.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-01-14 18:34:05 -0500 (Fri, 14 Jan 2011)
New Revision: 5752
Modified:
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/jsr168/api/PortletContextImpl.java
Log:
GTNPC-51 : PortletContext getResourcePaths(String s) should return null when an empty set is returned by the servlet container
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/jsr168/api/PortletContextImpl.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/jsr168/api/PortletContextImpl.java 2011-01-14 23:24:04 UTC (rev 5751)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/jsr168/api/PortletContextImpl.java 2011-01-14 23:34:05 UTC (rev 5752)
@@ -125,7 +125,9 @@
public Set<String> getResourcePaths(String s)
{
- return (Set<String>)servletContext.getResourcePaths(s);
+ Set<String> paths = (Set<String>)servletContext.getResourcePaths(s);
+ // Some container (jetty) may return an empty set instead of null
+ return (paths == null || paths.isEmpty()) ? null : paths;
}
public URL getResource(String s) throws MalformedURLException
13 years, 4 months
gatein SVN: r5751 - in components/pc/trunk: test/core/src/test/java/org/gatein/pc/test/portlet/jsr286/tck/dispatcher and 1 other directory.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-01-14 18:24:04 -0500 (Fri, 14 Jan 2011)
New Revision: 5751
Modified:
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/jsr168/DispatchedHttpServletRequest.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/jsr168/PortletRequestAttributes.java
components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr286/tck/dispatcher/RFRIContainerAttributesTestCase.java
components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr286/tck/dispatcher/RIRFContainerAttributesTestCase.java
components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr286/tck/dispatcher/RIRIContainerAttributesTestCase.java
Log:
GTNPC-50 : Request dispatching issues with Jetty
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/jsr168/DispatchedHttpServletRequest.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/jsr168/DispatchedHttpServletRequest.java 2011-01-14 20:09:15 UTC (rev 5750)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/jsr168/DispatchedHttpServletRequest.java 2011-01-14 23:24:04 UTC (rev 5751)
@@ -44,6 +44,7 @@
import javax.portlet.PortletConfig;
import java.security.Principal;
import java.util.Enumeration;
+import java.util.ListIterator;
import java.util.Locale;
import java.util.Map;
import java.util.LinkedList;
@@ -246,49 +247,40 @@
public final String getPathInfo()
{
- if (infos != null)
- {
- return infos[PATH_INFO];
- }
- else
- {
- return (String)preq.getAttribute(INCLUDE_KEYS[PATH_INFO]);
- }
+ return getSpecAttribute(PATH_INFO);
}
public final String getQueryString()
{
- if (infos != null)
- {
- return infos[QUERY_STRING];
- }
- else
- {
- return (String)preq.getAttribute(INCLUDE_KEYS[QUERY_STRING]);
- }
+ return getSpecAttribute(QUERY_STRING);
}
public final String getRequestURI()
{
- if (infos != null)
- {
- return infos[REQUEST_URI];
- }
- else
- {
- return (String)preq.getAttribute(INCLUDE_KEYS[REQUEST_URI]);
- }
+ return getSpecAttribute(REQUEST_URI);
}
public final String getServletPath()
{
- if (infos != null)
+ return getSpecAttribute(SERVLET_PATH);
+ }
+
+ private String getSpecAttribute(int index)
+ {
+ if (dispatches.getFirst().getPath() == null)
{
- return infos[SERVLET_PATH];
+ return null;
}
else
{
- return (String)preq.getAttribute(INCLUDE_KEYS[SERVLET_PATH]);
+ if (infos != null)
+ {
+ return infos[index];
+ }
+ else
+ {
+ return (String)preq.getAttribute(INCLUDE_KEYS[index]);
+ }
}
}
@@ -313,55 +305,53 @@
{
if (s != null)
{
-// Map<String, String> containerAttributes = containerAttributesStack.getLast();
-
- //
-// if (containerAttributes.containsKey(s))
-// {
-// return containerAttributes.get(s);
-// }
-
- if (dispatches.getLast().getType() == DispatchType.INCLUDE)
+ if (ALL_CONTAINER_ATTRIBUTES.contains(s))
{
- for (String key : INCLUDE_KEYS)
+ Dispatch dispatch = dispatches.getLast();
+ if (dispatch.getType() == DispatchType.INCLUDE)
{
- if (key.equals(s))
+ if (dispatch.getPath() == null)
{
- return preq.getAttribute(key);
+ return null;
}
+ else
+ {
+ for (String key : INCLUDE_KEYS)
+ {
+ if (key.equals(s))
+ {
+ return preq.getAttribute(key);
+ }
+ }
+ }
}
- }
- else
- {
- for (int i = 0;i < FORWARD_KEYS.length;i++)
+ else
{
- if (FORWARD_KEYS[i].equals(s))
+ for (ListIterator<Dispatch> it = dispatches.listIterator(dispatches.size());it.hasPrevious();)
{
- if (infos != null)
+ if (it.previous().getPath() == null)
{
- return infos[i];
+ return null;
}
- else
+ }
+ for (int i = 0;i < FORWARD_KEYS.length;i++)
+ {
+ if (FORWARD_KEYS[i].equals(s))
{
- return preq.getAttribute(INCLUDE_KEYS[i]);
+ if (infos != null)
+ {
+ return infos[i];
+ }
+ else
+ {
+ return preq.getAttribute(INCLUDE_KEYS[i]);
+ }
}
}
}
}
//
- String[] containerKeys = dispatches.getLast().getType() == DispatchType.FORWARD ? FORWARD_KEYS : INCLUDE_KEYS;
-
- //
- for (int i = 0;i < containerKeys.length;i++)
- {
- if (containerKeys[i].equals(s))
- {
- return preq.getAttribute(INCLUDE_KEYS[i]);
- }
- }
-
- //
if (ALL_CONTAINER_ATTRIBUTES.contains(s))
{
return null;
@@ -628,139 +618,8 @@
}
this.infos = infos;
}
-
-
-// String path = dispatch.getPath();
-//
-// //
-// String[] infos;
-// if (path != null)
-// {
-// infos = build(path);
-//
-// //
-// if (dispatch.getType() == DispatchType.INCLUDE)
-// {
-// Map<String, String> containerAttributes = new HashMap<String, String>();
-// for (int i = 0;i < infos.length;i++)
-// {
-// String value = infos[i];
-// if (value != null)
-// {
-// containerAttributes.put(INCLUDE_KEYS[i], value);
-// }
-// }
-// containerAttributesStack.addLast(containerAttributes);
-// }
-// else
-// {
-// if (containerAttributesStack.size() == 0)
-// {
-// Map<String, String> containerAttributes = new HashMap<String, String>();
-// for (int i = 0;i < infos.length;i++)
-// {
-// String value = infos[i];
-// if (value != null)
-// {
-// containerAttributes.put(FORWARD_KEYS[i], value);
-// }
-// }
-// containerAttributesStack.addLast(containerAttributes);
-// }
-// else
-// {
-// Map<String, String> containerAttributes = new HashMap<String, String>();
-// for (int i = 0;i < this.infos.length;i++)
-// {
-// String value = this.infos[i];
-// if (value != null)
-// {
-// containerAttributes.put(FORWARD_KEYS[i], value);
-// }
-// }
-// containerAttributesStack.addLast(containerAttributes);
-// }
-// }
-// }
-// else
-// {
-// infos = new String[5];
-//
-// //
-// Map<String, String> containerAttributes = Collections.emptyMap();
-// containerAttributesStack.addLast(containerAttributes);
-// }
-//
-// //
-// return infos;
}
-// private String[] build(String path)
-// {
-// if (path == null)
-// {
-// throw new IllegalArgumentException();
-// }
-//
-// //
-// String servletPath;
-// String pathInfo;
-// String queryString;
-// int endOfServletPath = path.indexOf('/', 1);
-// if (endOfServletPath == -1)
-// {
-// endOfServletPath = path.indexOf('?', 1);
-// if (endOfServletPath == -1)
-// {
-// servletPath = path;
-// pathInfo = "";
-// queryString = "";
-// }
-// else
-// {
-// servletPath = path.substring(0, endOfServletPath);
-// pathInfo = null;
-// queryString = path.substring(endOfServletPath + 1);
-// }
-// }
-// else
-// {
-// servletPath = path.substring(0, endOfServletPath);
-// int endOfPathInfo = path.indexOf('?', endOfServletPath + 1);
-// if (endOfPathInfo == -1)
-// {
-// pathInfo = path.substring(endOfServletPath);
-// queryString = "";
-// }
-// else
-// {
-// pathInfo = path.substring(endOfServletPath, endOfPathInfo);
-// queryString = path.substring(endOfPathInfo + 1);
-// }
-// }
-//
-// //
-// String[] infos = new String[5];
-//
-// //
-// StringBuffer requestURI = new StringBuffer(preq.getContextPath());
-// requestURI.append(servletPath);
-// if (pathInfo != null)
-// {
-// requestURI.append(pathInfo);
-// infos[PATH_INFO] = pathInfo;
-// }
-//
-// //
-// infos[SERVLET_PATH] = servletPath;
-// infos[QUERY_STRING] = queryString;
-// infos[REQUEST_URI] = requestURI.toString();
-// infos[CONTEXT_PATH] = preq.getContextPath();
-//
-// //
-// return infos;
-// }
-
void popDispatch()
{
if (dispatches.size() == 2)
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/jsr168/PortletRequestAttributes.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/jsr168/PortletRequestAttributes.java 2011-01-14 20:09:15 UTC (rev 5750)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/jsr168/PortletRequestAttributes.java 2011-01-14 23:24:04 UTC (rev 5751)
@@ -148,7 +148,7 @@
{
value = attributes.get(name);
}
- if (value == null && wreq != null)
+ if (value == null)
{
value = wreq.getAttribute(name);
}
Modified: components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr286/tck/dispatcher/RFRIContainerAttributesTestCase.java
===================================================================
--- components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr286/tck/dispatcher/RFRIContainerAttributesTestCase.java 2011-01-14 20:09:15 UTC (rev 5750)
+++ components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr286/tck/dispatcher/RFRIContainerAttributesTestCase.java 2011-01-14 23:24:04 UTC (rev 5751)
@@ -45,9 +45,6 @@
public class RFRIContainerAttributesTestCase extends DispatchedContainerAttributesTestCase
{
- /** . */
- public static final Map<String, String> EXPECTED_ATTRIBUTES_SET = buildAttributes();
-
private static Map<String, String> buildAttributes()
{
Map<String, String> map = new HashMap<String, String>();
Modified: components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr286/tck/dispatcher/RIRFContainerAttributesTestCase.java
===================================================================
--- components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr286/tck/dispatcher/RIRFContainerAttributesTestCase.java 2011-01-14 20:09:15 UTC (rev 5750)
+++ components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr286/tck/dispatcher/RIRFContainerAttributesTestCase.java 2011-01-14 23:24:04 UTC (rev 5751)
@@ -45,9 +45,6 @@
public class RIRFContainerAttributesTestCase extends DispatchedContainerAttributesTestCase
{
- /** . */
- public static final Map<String, String> EXPECTED_ATTRIBUTES_SET = buildAttributes();
-
private static Map<String, String> buildAttributes()
{
Map<String, String> map = new HashMap<String, String>();
Modified: components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr286/tck/dispatcher/RIRIContainerAttributesTestCase.java
===================================================================
--- components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr286/tck/dispatcher/RIRIContainerAttributesTestCase.java 2011-01-14 20:09:15 UTC (rev 5750)
+++ components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr286/tck/dispatcher/RIRIContainerAttributesTestCase.java 2011-01-14 23:24:04 UTC (rev 5751)
@@ -44,9 +44,6 @@
public class RIRIContainerAttributesTestCase extends DispatchedContainerAttributesTestCase
{
- /** . */
- public static final Map<String, String> EXPECTED_ATTRIBUTES_SET = buildAttributes();
-
private static Map<String, String> buildAttributes()
{
Map<String, String> map = new HashMap<String, String>();
13 years, 4 months
gatein SVN: r5750 - in components/pc/trunk: federation/src/main/java/org/gatein/pc/federation/impl and 6 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-01-14 15:09:15 -0500 (Fri, 14 Jan 2011)
New Revision: 5750
Modified:
components/pc/trunk/api/src/main/java/org/gatein/pc/api/PortletInvoker.java
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatedPortletInvokerService.java
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java
components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/PortletInvokerInterceptor.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/container/ContainerPortletInvoker.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/state/consumer/ConsumerPortletInvoker.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/state/producer/ProducerPortletInvoker.java
components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/support/PortletInvokerSupport.java
Log:
- GTNPC-49: Added isKnown and isExposed methods and relevant implementations.
- Improved documentation of PortletInvoker to make intent of getPortlets and getPortlet methods clearer.
Modified: components/pc/trunk/api/src/main/java/org/gatein/pc/api/PortletInvoker.java
===================================================================
--- components/pc/trunk/api/src/main/java/org/gatein/pc/api/PortletInvoker.java 2011-01-14 16:11:17 UTC (rev 5749)
+++ components/pc/trunk/api/src/main/java/org/gatein/pc/api/PortletInvoker.java 2011-01-14 20:09:15 UTC (rev 5750)
@@ -41,7 +41,7 @@
String LOCAL_PORTLET_INVOKER_ID = "local";
/**
- * Return the set of portlet exposed.
+ * Return the set of portlet exposed. Usually, this means only non-customized portlets.
*
* @return the set of exposed portlets
* @throws PortletInvokerException a portlet invoker exception
@@ -49,7 +49,10 @@
Set<Portlet> getPortlets() throws PortletInvokerException;
/**
- * Get information about a specific portlet.
+ * Get information about a specific portlet. Note that this PortletInvoker can know about more portlets than returned
+ * by {@link #getPortlets()}. In particular, cloned portlets wouldn't necessarily be exposed to getPortlets and still
+ * be known by this PortletInvoker i.e. there exists PortletContexts <code>pc</code> as follows: <p> <code> assert
+ * getPortlet(pc) != null && !getPortlets().contains(portlet);<br/> </code> </p>
*
* @param portletContext the portlet context in the scope of this invoker
* @return the <code>PortletInfo</code> for the specified portlet
@@ -59,6 +62,30 @@
Portlet getPortlet(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException;
/**
+ * Determines whether the specified PortletContext is part of the set of exposed Portlets as returned by {@link
+ * #getPortlets()}.
+ *
+ * @param portletContext the PortletContext which exposed status we want to determine
+ * @return <code>true</code> if the Portlet associated with the specified PortletContext is exposed by this
+ * PortletInvoker, <code>false</code> otherwise
+ * @throws IllegalArgumentException if the specified PortletContext is null
+ * @throws PortletInvokerException if some other error occurs
+ */
+ boolean isExposed(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException;
+
+ /**
+ * Determines whether the Portlet associated with the specified PortletContext (if it exists) is known to this
+ * PortletInvoker whether it is exposed or not. In particular, if this method returns <code>true</code> then {@link
+ * #getPortlet(PortletContext)} will return a valid Portlet.
+ *
+ * @param portletContext the PortletContext to check
+ * @return <code>true</code>
+ * @throws IllegalArgumentException
+ * @throws PortletInvokerException
+ */
+ boolean isKnown(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException;
+
+ /**
* Invoke an operation on a specific portlet.
*
* @param invocation the portlet invocation
@@ -125,23 +152,23 @@
* @throws PortletInvokerException a portlet invoker exception
*/
PortletContext setProperties(PortletContext portletContext, PropertyChange[] changes) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException;
-
+
/**
* Exports a portlet from the invoker which can be used to recreate this portlet during an import portlet operation
- * The returned portlet Id will be the portlet Id of the base portlet, not a cloned portlet Id
- * If the portlet contains state, it will be returned regardless if the portlet invoker is set to persist state locally.
- *
- * @param stateType the portlet state type desired
+ * The returned portlet Id will be the portlet Id of the base portlet, not a cloned portlet Id If the portlet
+ * contains state, it will be returned regardless if the portlet invoker is set to persist state locally.
+ *
+ * @param stateType the portlet state type desired
* @param originalPortletContext the context of the porlet to be exported
* @return A new portlet context which can be used to import a portlet
* @throws PortletInvokerException
*/
PortletContext exportPortlet(PortletStateType stateType, PortletContext originalPortletContext) throws PortletInvokerException;
-
+
/**
* Imports a portlet into the invoker.
- *
- * @param stateType the portlet state type desired
+ *
+ * @param stateType the portlet state type desired
* @param contextToImport the context to be imported
* @return The portletcontext for the imported portlet
* @throws PortletInvokerException
Modified: components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatedPortletInvokerService.java
===================================================================
--- components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatedPortletInvokerService.java 2011-01-14 16:11:17 UTC (rev 5749)
+++ components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatedPortletInvokerService.java 2011-01-14 20:09:15 UTC (rev 5750)
@@ -107,6 +107,18 @@
return new FederatedPortlet(this, compoundPortletContext, portlet);
}
+ public boolean isExposed(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException
+ {
+ PortletContext context = dereference(portletContext);
+ return portletInvoker.isExposed(context);
+ }
+
+ public boolean isKnown(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException
+ {
+ PortletContext context = dereference(portletContext);
+ return portletInvoker.isKnown(context);
+ }
+
private class FederatedInstanceContext implements InstanceContext
{
Modified: components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java
===================================================================
--- components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java 2011-01-14 16:11:17 UTC (rev 5749)
+++ components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java 2011-01-14 20:09:15 UTC (rev 5750)
@@ -204,6 +204,18 @@
return federated.getPortlet(compoundPortletContext);
}
+ public boolean isExposed(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException
+ {
+ PortletInvoker federated = getFederatedPortletInvokerFor(portletContext);
+ return federated.isExposed(portletContext);
+ }
+
+ public boolean isKnown(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException
+ {
+ PortletInvoker federated = getFederatedPortletInvokerFor(portletContext);
+ return federated.isKnown(portletContext);
+ }
+
public PortletInvocationResponse invoke(PortletInvocation invocation) throws PortletInvokerException
{
PortletContext compoundPortletContext = invocation.getTarget();
Modified: components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java
===================================================================
--- components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java 2011-01-14 16:11:17 UTC (rev 5749)
+++ components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java 2011-01-14 20:09:15 UTC (rev 5750)
@@ -116,6 +116,26 @@
}
@Test
+ public void testIsExposed() throws PortletInvokerException
+ {
+ assertTrue(federatingInvoker.isExposed(PortletContext.createPortletContext("foo.MyPortlet")));
+ assertTrue(federatingInvoker.isExposed(PortletContext.createPortletContext(PortletInvoker.LOCAL_PORTLET_INVOKER_ID + ".MyLocalPortlet")));
+
+ assertTrue(federatedInvoker.isExposed(PortletContext.createPortletContext("foo.MyPortlet")));
+ assertTrue(localInvoker.isExposed(PortletContext.createPortletContext(PortletInvoker.LOCAL_PORTLET_INVOKER_ID + ".MyLocalPortlet")));
+ }
+
+ @Test
+ public void testIsKnown() throws PortletInvokerException
+ {
+ assertTrue(federatingInvoker.isKnown(PortletContext.createPortletContext("foo.MyPortlet")));
+ assertTrue(federatingInvoker.isKnown(PortletContext.createPortletContext(PortletInvoker.LOCAL_PORTLET_INVOKER_ID + ".MyLocalPortlet")));
+
+ assertTrue(federatedInvoker.isKnown(PortletContext.createPortletContext("foo.MyPortlet")));
+ assertTrue(localInvoker.isKnown(PortletContext.createPortletContext(PortletInvoker.LOCAL_PORTLET_INVOKER_ID + ".MyLocalPortlet")));
+ }
+
+ @Test
public void testFederation() throws PortletInvokerException
{
Collection federateds = federatingInvoker.getFederatedInvokers();
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/PortletInvokerInterceptor.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/PortletInvokerInterceptor.java 2011-01-14 16:11:17 UTC (rev 5749)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/PortletInvokerInterceptor.java 2011-01-14 20:09:15 UTC (rev 5750)
@@ -22,29 +22,27 @@
******************************************************************************/
package org.gatein.pc.portlet;
-import org.gatein.pc.api.state.DestroyCloneFailure;
-import org.gatein.pc.api.state.PropertyMap;
-import org.gatein.pc.api.state.PropertyChange;
-import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
-import org.gatein.pc.api.invocation.PortletInvocation;
import org.gatein.pc.api.Portlet;
import org.gatein.pc.api.PortletContext;
+import org.gatein.pc.api.PortletInvoker;
import org.gatein.pc.api.PortletInvokerException;
-import org.gatein.pc.api.PortletInvoker;
import org.gatein.pc.api.PortletStateType;
-import org.gatein.pc.portlet.state.StateConversionException;
+import org.gatein.pc.api.invocation.PortletInvocation;
+import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
+import org.gatein.pc.api.state.DestroyCloneFailure;
+import org.gatein.pc.api.state.PropertyChange;
+import org.gatein.pc.api.state.PropertyMap;
-import java.io.Serializable;
+import java.util.List;
import java.util.Set;
-import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
/**
- * A base class for {@link org.gatein.pc.api.PortletInvoker} interface interceptors. The subclasses
- * extends it and override the intercepted methods. The next interceptor in the chain is wired in the field
- * {@link #next} of the interceptor. When the interceptor wants to give control to the next interceptor, it must
- * invoke the same method on the super class. If no next interceptor is configured the invocation of the parent
- * method will throw an {@link IllegalStateException}.
+ * A base class for {@link org.gatein.pc.api.PortletInvoker} interface interceptors. The subclasses extends it and
+ * override the intercepted methods. The next interceptor in the chain is wired in the field {@link #next} of the
+ * interceptor. When the interceptor wants to give control to the next interceptor, it must invoke the same method on
+ * the super class. If no next interceptor is configured the invocation of the parent method will throw an {@link
+ * IllegalStateException}.
*
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
* @version $Revision: 630 $
@@ -84,6 +82,16 @@
return safeGetNext().getPortlet(portletContext);
}
+ public boolean isExposed(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException
+ {
+ return safeGetNext().isExposed(portletContext);
+ }
+
+ public boolean isKnown(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException
+ {
+ return safeGetNext().isKnown(portletContext);
+ }
+
public PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException
{
return safeGetNext().invoke(invocation);
@@ -115,8 +123,8 @@
}
/**
- * Attempt to get the next invoker, the method never returns a null value and rather throws an {@link IllegalStateException}
- * if the next invoker cannot be obtained.
+ * Attempt to get the next invoker, the method never returns a null value and rather throws an {@link
+ * IllegalStateException} if the next invoker cannot be obtained.
*
* @return the non null next invoker
*/
@@ -135,13 +143,13 @@
}
public PortletContext exportPortlet(PortletStateType stateType, PortletContext originalPortletContext)
- throws PortletInvokerException, IllegalArgumentException
+ throws PortletInvokerException, IllegalArgumentException
{
return safeGetNext().exportPortlet(stateType, originalPortletContext);
}
-
+
public PortletContext importPortlet(PortletStateType stateType, PortletContext originalPortletContext)
- throws PortletInvokerException, IllegalArgumentException
+ throws PortletInvokerException, IllegalArgumentException
{
return safeGetNext().importPortlet(stateType, originalPortletContext);
}
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/container/ContainerPortletInvoker.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/container/ContainerPortletInvoker.java 2011-01-14 16:11:17 UTC (rev 5749)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/container/ContainerPortletInvoker.java 2011-01-14 20:09:15 UTC (rev 5750)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.gatein.pc.portlet.container;
+import org.gatein.common.util.ParameterValidation;
import org.gatein.pc.api.NoSuchPortletException;
import org.gatein.pc.api.Portlet;
import org.gatein.pc.api.PortletContext;
@@ -86,6 +87,19 @@
return new HashSet<Portlet>(portlets.values());
}
+ @Override
+ public boolean isExposed(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(portletContext, "PortletContext");
+ return portlets.containsKey(portletContext.getId());
+ }
+
+ @Override
+ public boolean isKnown(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException
+ {
+ return isExposed(portletContext);
+ }
+
public Portlet getPortlet(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException
{
if (portletContext == null)
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/state/consumer/ConsumerPortletInvoker.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/state/consumer/ConsumerPortletInvoker.java 2011-01-14 16:11:17 UTC (rev 5749)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/state/consumer/ConsumerPortletInvoker.java 2011-01-14 20:09:15 UTC (rev 5750)
@@ -27,25 +27,25 @@
import org.gatein.pc.api.NoSuchPortletException;
import org.gatein.pc.api.Portlet;
import org.gatein.pc.api.PortletContext;
+import org.gatein.pc.api.PortletInvokerException;
+import org.gatein.pc.api.PortletStateType;
import org.gatein.pc.api.StateEvent;
-import org.gatein.pc.api.PortletInvokerException;
import org.gatein.pc.api.StatefulPortletContext;
-import org.gatein.pc.api.PortletStateType;
-import org.gatein.pc.api.state.PropertyMap;
-import org.gatein.pc.portlet.PortletInvokerInterceptor;
import org.gatein.pc.api.invocation.PortletInvocation;
import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
import org.gatein.pc.api.spi.InstanceContext;
import org.gatein.pc.api.state.AccessMode;
+import org.gatein.pc.api.state.DestroyCloneFailure;
+import org.gatein.pc.api.state.PropertyChange;
+import org.gatein.pc.api.state.PropertyMap;
+import org.gatein.pc.portlet.PortletInvokerInterceptor;
import org.gatein.pc.portlet.state.InvalidStateIdException;
import org.gatein.pc.portlet.state.NoSuchStateException;
-import org.gatein.pc.api.state.PropertyChange;
-import org.gatein.pc.api.state.DestroyCloneFailure;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
-import java.io.Serializable;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -121,6 +121,19 @@
return getConsumerContext(portletContext).getPortlet();
}
+ @Override
+ public boolean isKnown(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException
+ {
+ try
+ {
+ return getPortlet(portletContext) != null;
+ }
+ catch (NoSuchPortletException e)
+ {
+ return false;
+ }
+ }
+
public PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException
{
PortletContext portletContext = invocation.getTarget();
@@ -226,12 +239,12 @@
}
public PortletContext importPortlet(PortletStateType stateType,
- PortletContext portletContext) throws PortletInvokerException, IllegalArgumentException
+ PortletContext portletContext) throws PortletInvokerException, IllegalArgumentException
{
ConsumerContext consumerContext = getConsumerContext(portletContext);
-
+
PortletContext importContext = super.importPortlet(stateType, consumerContext.producerPortletContext);
-
+
if (importContext instanceof StatefulPortletContext)
{
StatefulPortletContext statefulimportContext = (StatefulPortletContext)importContext;
@@ -243,18 +256,18 @@
{
return importContext;
}
-
+
}
-
+
public PortletContext exportPortlet(PortletStateType stateType,
- PortletContext portletContext) throws PortletInvokerException, IllegalArgumentException
+ PortletContext portletContext) throws PortletInvokerException, IllegalArgumentException
{
ConsumerContext consumerContext = getConsumerContext(portletContext);
-
+
//
return super.exportPortlet(stateType, consumerContext.producerPortletContext);
}
-
+
public List<DestroyCloneFailure> destroyClones(List<PortletContext> portletContexts) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
{
if (portletContexts == null)
@@ -396,7 +409,8 @@
}
}
- public PortletStateType<?> getStateType() {
+ public PortletStateType<?> getStateType()
+ {
return persistenceManager.getStateType();
}
}
@@ -419,9 +433,9 @@
{
ConsumerStateContext stateCtx = persistenceManager.loadState(stateId);
StatefulPortletContext<Serializable> blah = StatefulPortletContext.create(
- stateCtx.getPortletId(),
- stateCtx.getStateType(),
- stateCtx.getState());
+ stateCtx.getPortletId(),
+ stateCtx.getStateType(),
+ stateCtx.getState());
return new ConsumerContext(portletContext, blah, stateId);
}
catch (NoSuchStateException e)
@@ -439,9 +453,7 @@
}
}
- /**
- * A context which defines how the consumer see the producer portlet.
- */
+ /** A context which defines how the consumer see the producer portlet. */
private class ConsumerContext
{
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/state/producer/ProducerPortletInvoker.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/state/producer/ProducerPortletInvoker.java 2011-01-14 16:11:17 UTC (rev 5749)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/state/producer/ProducerPortletInvoker.java 2011-01-14 20:09:15 UTC (rev 5750)
@@ -124,6 +124,19 @@
return _getPortlet(portletContext);
}
+ @Override
+ public boolean isKnown(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException
+ {
+ try
+ {
+ return getPortlet(portletContext) != null;
+ }
+ catch (NoSuchPortletException e)
+ {
+ return false;
+ }
+ }
+
private <S extends Serializable> Portlet _getPortlet(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException
{
@@ -649,10 +662,10 @@
{
StatefulContext statefulContext = (StatefulContext)context;
try
- {
+ {
PortletState sstate = new PortletState(portletId, statefulContext.getProperties());
Serializable marshalledState = stateConverter.marshall(stateType, sstate);
- return StatefulPortletContext.create(portletId, stateType, marshalledState);
+ return StatefulPortletContext.create(portletId, stateType, marshalledState);
}
catch (StateConversionException e)
{
@@ -685,19 +698,19 @@
}
}
}
-
+
public PortletContext importPortlet(PortletStateType stateType, PortletContext contextToImport) throws PortletInvokerException
{
if (contextToImport == null)
{
throw new IllegalArgumentException("No null portlet id accepted");
}
-
+
try
{
if (contextToImport instanceof StatefulPortletContext)
{
- StatefulPortletContext statefulPortletContext = (StatefulPortletContext) contextToImport;
+ StatefulPortletContext statefulPortletContext = (StatefulPortletContext)contextToImport;
Boolean persistLocally = stateManagementPolicy.persistLocally();
PortletState portletState = getStateConverter().unmarshall(stateType, statefulPortletContext.getState());
@@ -727,7 +740,7 @@
throw new PortletInvokerException(e);
}
}
-
+
private <S extends Serializable> PortletContext marshall(PortletStateType<S> stateType, String portletId, PropertyMap props) throws PortletInvokerException
{
try
Modified: components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/support/PortletInvokerSupport.java
===================================================================
--- components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/support/PortletInvokerSupport.java 2011-01-14 16:11:17 UTC (rev 5749)
+++ components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/support/PortletInvokerSupport.java 2011-01-14 20:09:15 UTC (rev 5750)
@@ -26,23 +26,23 @@
import org.gatein.pc.api.NoSuchPortletException;
import org.gatein.pc.api.Portlet;
import org.gatein.pc.api.PortletContext;
+import org.gatein.pc.api.PortletInvoker;
import org.gatein.pc.api.PortletInvokerException;
-import org.gatein.pc.api.PortletInvoker;
import org.gatein.pc.api.PortletStateType;
-import org.gatein.pc.api.state.PropertyMap;
-import org.gatein.pc.portlet.support.info.PortletInfoSupport;
import org.gatein.pc.api.invocation.PortletInvocation;
import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
+import org.gatein.pc.api.state.DestroyCloneFailure;
import org.gatein.pc.api.state.PropertyChange;
-import org.gatein.pc.api.state.DestroyCloneFailure;
+import org.gatein.pc.api.state.PropertyMap;
import org.gatein.pc.portlet.state.SimplePropertyMap;
+import org.gatein.pc.portlet.support.info.PortletInfoSupport;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.ArrayList;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -103,9 +103,9 @@
}
/**
- * Returns a portlet or null if it is not found. The portlet is returned whether it is tagged as valid or not.
- * This method is not equivalent to the <code>getPortlet(PortletContext)</code> method which returns a portlet
- * only if that one is valid. It should be used for configuration purposes.
+ * Returns a portlet or null if it is not found. The portlet is returned whether it is tagged as valid or not. This
+ * method is not equivalent to the <code>getPortlet(PortletContext)</code> method which returns a portlet only if
+ * that one is valid. It should be used for configuration purposes.
*
* @param portletId the portlet id
* @return the portlet
@@ -132,6 +132,16 @@
return internalGetPortlet(portletContext);
}
+ public boolean isExposed(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException
+ {
+ return portlets.containsKey(portletContext.getId());
+ }
+
+ public boolean isKnown(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException
+ {
+ return isExposed(portletContext);
+ }
+
public PortletInvocationResponse invoke(PortletInvocation invocation) throws PortletInvokerException
{
PortletContext portletContext = invocation.getTarget();
@@ -187,7 +197,7 @@
{
PortletSupport internalPortlet = internalGetPortlet(portletContext);
PropertyMap props = new SimplePropertyMap();
- for (String key: internalPortlet.state.keySet())
+ for (String key : internalPortlet.state.keySet())
{
List<String> value = internalPortlet.state.get(key);
if (value != null)
@@ -214,13 +224,13 @@
}
public PortletContext exportPortlet(PortletStateType stateType,
- PortletContext originalPortletContext) throws PortletInvokerException, IllegalArgumentException
+ PortletContext originalPortletContext) throws PortletInvokerException, IllegalArgumentException
{
throw new UnsupportedOperationException();
}
public PortletContext importPortlet(PortletStateType stateType,
- PortletContext originalPortletContext) throws PortletInvokerException, IllegalArgumentException
+ PortletContext originalPortletContext) throws PortletInvokerException, IllegalArgumentException
{
throw new UnsupportedOperationException();
}
13 years, 4 months
gatein SVN: r5749 - in components/wsrp/trunk/wsrp-producer-war: src/test/assembly and 4 other directories.
by do-not-reply@jboss.org
Author: mvanco(a)redhat.com
Date: 2011-01-14 11:11:17 -0500 (Fri, 14 Jan 2011)
New Revision: 5749
Added:
components/wsrp/trunk/wsrp-producer-war/src/test/assembly/test-windowstates-portlet.xml
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/WindowStatesPortlet.java
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-windowstates-portlet-war/
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-windowstates-portlet-war/WEB-INF/
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-windowstates-portlet-war/WEB-INF/portlet.xml
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-windowstates-portlet-war/WEB-INF/web.xml
Modified:
components/wsrp/trunk/wsrp-producer-war/pom.xml
Log:
WSRP2 Sample portlets
- added new sample portlet for window states
Modified: components/wsrp/trunk/wsrp-producer-war/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/pom.xml 2011-01-14 15:04:56 UTC (rev 5748)
+++ components/wsrp/trunk/wsrp-producer-war/pom.xml 2011-01-14 16:11:17 UTC (rev 5749)
@@ -182,6 +182,7 @@
<descriptor>src/test/assembly/test-prp-portlet.xml</descriptor>
<descriptor>src/test/assembly/test-state-portlet.xml</descriptor>
<descriptor>src/test/assembly/test-resourceserving-portlet.xml</descriptor>
+ <descriptor>src/test/assembly/test-windowstates-portlet.xml</descriptor>
</descriptors>
</configuration>
<executions>
Added: components/wsrp/trunk/wsrp-producer-war/src/test/assembly/test-windowstates-portlet.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/assembly/test-windowstates-portlet.xml (rev 0)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/assembly/test-windowstates-portlet.xml 2011-01-14 16:11:17 UTC (rev 5749)
@@ -0,0 +1,25 @@
+<assembly>
+ <id>windowstates-portlet</id>
+ <formats>
+ <format>war</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <!-- Test Classes -->
+ <fileSet>
+ <directory>target/test-classes</directory>
+ <outputDirectory>WEB-INF/classes</outputDirectory>
+ <includes>
+ <include>org/gatein/wsrp/portlet/WindowStatesPortlet.class</include>
+ </includes>
+ </fileSet>
+ <!-- Fileset for the sar strucuture -->
+ <fileSet>
+ <directory>src/test/test-portlets/test-windowstates-portlet-war</directory>
+ <outputDirectory></outputDirectory>
+ </fileSet>
+ </fileSets>
+
+</assembly>
+
Added: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/WindowStatesPortlet.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/WindowStatesPortlet.java (rev 0)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/WindowStatesPortlet.java 2011-01-14 16:11:17 UTC (rev 5749)
@@ -0,0 +1,52 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2010, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.gatein.wsrp.portlet;
+
+import java.io.IOException;
+
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.WindowState;
+
+/**
+ * @author <a href="mailto:mvanco@redhat.com">Michal Vanco</a>
+ * @version $Revision$
+ */
+public class WindowStatesPortlet extends GenericPortlet
+{
+
+ @Override
+ public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
+ {
+ response.setContentType("text/html");
+
+ StringBuffer sb = new StringBuffer();
+ sb.append("<h1>Welcome to window states sample</h1>");
+ sb.append("now you have <b>${state}</b> state selected.");
+ WindowState state = request.getWindowState();
+ response.getWriter().print(sb.toString().replace("${state}", state.toString()));
+ }
+
+}
Added: components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-windowstates-portlet-war/WEB-INF/portlet.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-windowstates-portlet-war/WEB-INF/portlet.xml (rev 0)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-windowstates-portlet-war/WEB-INF/portlet.xml 2011-01-14 16:11:17 UTC (rev 5749)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ JBoss, a division of Red Hat
+ ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+<portlet-app xmlns='http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+ xsi:schemaLocation='http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd'
+ version='2.0'>
+ <portlet>
+ <description>Window States</description>
+ <portlet-name>Window States</portlet-name>
+ <display-name>Window States</display-name>
+ <portlet-class>org.gatein.wsrp.portlet.WindowStatesPortlet</portlet-class>
+ <expiration-cache>0</expiration-cache>
+
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+
+ <portlet-info>
+ <title>Window States sample</title>
+ <short-title>Window States sample</short-title>
+ </portlet-info>
+ </portlet>
+
+ <!-- Make these portlets remotable -->
+ <container-runtime-option>
+ <name>org.gatein.pc.remotable</name>
+ <value>true</value>
+ </container-runtime-option>
+
+</portlet-app>
Added: components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-windowstates-portlet-war/WEB-INF/web.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-windowstates-portlet-war/WEB-INF/web.xml (rev 0)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-windowstates-portlet-war/WEB-INF/web.xml 2011-01-14 16:11:17 UTC (rev 5749)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2007, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<web-app version="2.4"
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+</web-app>
\ No newline at end of file
13 years, 4 months
gatein SVN: r5748 - in components/pc/trunk/test: core/src/main/packaging/jsr168/ext/session-war/META-INF and 3 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-01-14 10:04:56 -0500 (Fri, 14 Jan 2011)
New Revision: 5748
Added:
components/pc/trunk/test/core/src/main/packaging/jsr168/ext/session-war/META-INF/
components/pc/trunk/test/core/src/main/packaging/jsr168/ext/session-war/META-INF/context.xml
Modified:
components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr168/ext/session/CrossContextSessionAttributeTestCase.java
components/pc/trunk/test/servers/tomcat7/src/test/resources/portlet-tck-war/META-INF/context.xml
components/pc/trunk/test/servers/tomcat7/src/test/resources/portlet-test-war/META-INF/context.xml
Log:
GTNPC-48 : Configure sessionCookiePath="/" to make the CrossContextSessionAttributeTestCase pass on Tomcat 7
Added: components/pc/trunk/test/core/src/main/packaging/jsr168/ext/session-war/META-INF/context.xml
===================================================================
--- components/pc/trunk/test/core/src/main/packaging/jsr168/ext/session-war/META-INF/context.xml (rev 0)
+++ components/pc/trunk/test/core/src/main/packaging/jsr168/ext/session-war/META-INF/context.xml 2011-01-14 15:04:56 UTC (rev 5748)
@@ -0,0 +1,6 @@
+<!--
+ | The sessionCookiePath set to '/' is necessary for Tomcat 7 . Normally it should be set as a default in Tomcat configuration
+ | but setting it here allows to make the test path with a an unmodified Tomcat
+ -->
+<Context sessionCookiePath="/">
+</Context>
Modified: components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr168/ext/session/CrossContextSessionAttributeTestCase.java
===================================================================
--- components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr168/ext/session/CrossContextSessionAttributeTestCase.java 2011-01-14 12:02:08 UTC (rev 5747)
+++ components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr168/ext/session/CrossContextSessionAttributeTestCase.java 2011-01-14 15:04:56 UTC (rev 5748)
@@ -45,13 +45,15 @@
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
+import java.util.Enumeration;
/**
- * The goal is to test that cross context session attributes are set in container and are accessible from the direct
- * servlet.
- * <p/>
- * 1/ portlet put key=value in the http session 2/ portlet ask the client to perform get on /servlet 3/ servlet check
- * that key=value
+ * <p>The goal is to test that cross context session attributes are set in container and are accessible from the direct
+ * servlet.<p/>
+ *
+ * 1/ portlet put key=value in the http session
+ * 2/ portlet ask the client to perform get on /servlet
+ * 3/ servlet check that key=value
*
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
Modified: components/pc/trunk/test/servers/tomcat7/src/test/resources/portlet-tck-war/META-INF/context.xml
===================================================================
--- components/pc/trunk/test/servers/tomcat7/src/test/resources/portlet-tck-war/META-INF/context.xml 2011-01-14 12:02:08 UTC (rev 5747)
+++ components/pc/trunk/test/servers/tomcat7/src/test/resources/portlet-tck-war/META-INF/context.xml 2011-01-14 15:04:56 UTC (rev 5748)
@@ -1,2 +1,2 @@
-<Context privileged="true">
+<Context privileged="true" sessionCookiePath="/">
</Context>
Modified: components/pc/trunk/test/servers/tomcat7/src/test/resources/portlet-test-war/META-INF/context.xml
===================================================================
--- components/pc/trunk/test/servers/tomcat7/src/test/resources/portlet-test-war/META-INF/context.xml 2011-01-14 12:02:08 UTC (rev 5747)
+++ components/pc/trunk/test/servers/tomcat7/src/test/resources/portlet-test-war/META-INF/context.xml 2011-01-14 15:04:56 UTC (rev 5748)
@@ -1,2 +1,2 @@
-<Context privileged="true">
+<Context privileged="true" sessionCookiePath="/">
</Context>
\ No newline at end of file
13 years, 4 months