Author: chris.laprun(a)jboss.com
Date: 2007-03-04 19:07:16 -0500 (Sun, 04 Mar 2007)
New Revision: 6534
Added:
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/portlet/ResourcePortlet.java
trunk/wsrp/src/resources/tests/test-resource-portlet-war/gif/
trunk/wsrp/src/resources/tests/test-resource-portlet-war/gif/logo.gif
Modified:
trunk/wsrp/build.xml
Log:
- Added ResourcePortlet and associated resources.
- Added ResourcePortlet to test portlets packaging.
Modified: trunk/wsrp/build.xml
===================================================================
--- trunk/wsrp/build.xml 2007-03-05 00:05:03 UTC (rev 6533)
+++ trunk/wsrp/build.xml 2007-03-05 00:07:16 UTC (rev 6534)
@@ -579,6 +579,9 @@
<!-- ImplicitCloning test portlet -->
<package-test-portlet archiveName="implicitcloning"
portletName="ImplicitCloning"/>
+
+ <!-- Resourceportlet test portlet -->
+ <package-test-portlet archiveName="resource"
portletName="Resource"/>
</target>
<!-- Packages all the test related artifacts. Note that compilation should have
been already executed -->
Copied: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/portlet/ResourcePortlet.java (from
rev 6530, trunk/wsrp/src/main/org/jboss/portal/test/wsrp/portlet/EncodeURLPortlet.java)
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/portlet/ResourcePortlet.java
(rev 0)
+++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/portlet/ResourcePortlet.java 2007-03-05
00:07:16 UTC (rev 6534)
@@ -0,0 +1,47 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, 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.jboss.portal.test.wsrp.portlet;
+
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.PortletSecurityException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+import java.io.Writer;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ * @since 2.4 (May 6, 2006)
+ */
+public class ResourcePortlet extends GenericPortlet
+{
+ protected void doView(RenderRequest request, RenderResponse response) throws
PortletException, PortletSecurityException, IOException
+ {
+ response.setContentType("text/html");
+ Writer writer = response.getWriter();
+ writer.write("<img src=\"" +
response.encodeURL(request.getContextPath() + "/gif/logo.gif") +
"\"/>");
+ }
+}
\ No newline at end of file
Added: trunk/wsrp/src/resources/tests/test-resource-portlet-war/gif/logo.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/wsrp/src/resources/tests/test-resource-portlet-war/gif/logo.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream