Author: julien(a)jboss.com
Date: 2008-03-02 18:21:50 -0500 (Sun, 02 Mar 2008)
New Revision: 10176
Added:
modules/portlet/trunk/samples/src/assemble/samples-jsp-portlet.xml
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/WEB-INF/
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/WEB-INF/jsp/
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/WEB-INF/jsp/view.jsp
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/WEB-INF/portlet.xml
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/WEB-INF/web.xml
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/images/
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/images/accessorize.gif
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/images/dodemo.gif
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/images/getcode.gif
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/jsp/
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/jsp/JSPPortlet.java
Modified:
modules/portlet/trunk/build/distrib/distrib.xml
modules/portlet/trunk/build/distrib/jboss-4.2/server/default/deploy/jboss-web.deployer/conf/web.xml
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo.jsp
modules/portlet/trunk/samples/pom.xml
Log:
- added JSP sample coming from 2.6.4 GA
- added configuration of global tld for jboss 4.2
Modified: modules/portlet/trunk/build/distrib/distrib.xml
===================================================================
--- modules/portlet/trunk/build/distrib/distrib.xml 2008-03-02 22:25:32 UTC (rev 10175)
+++ modules/portlet/trunk/build/distrib/distrib.xml 2008-03-02 23:21:50 UTC (rev 10176)
@@ -139,6 +139,7 @@
<copy
file="${source.dir}/samples/target/portlet-samples-${maven.version}-samples-google-portlet.war"
tofile="${bin.dir}/samples/samples-google-portlet.war"/>
<copy
file="${source.dir}/samples/target/portlet-samples-${maven.version}-samples-remotecontroller-portlet.war"
tofile="${bin.dir}/samples/samples-remotecontroller-portlet.war"/>
<copy
file="${source.dir}/samples/target/portlet-samples-${maven.version}-samples-shoppingcart-portlet.war"
tofile="${bin.dir}/samples/samples-shoppingcart-portlet.war"/>
+ <copy
file="${source.dir}/samples/target/portlet-samples-${maven.version}-samples-jsp-portlet.war"
tofile="${bin.dir}/samples/samples-jsp-portlet.war"/>
</target>
<target name="__package-bundled-binary" unless="bin-alone">
@@ -146,6 +147,7 @@
<copy
file="${source.dir}/samples/target/portlet-samples-${maven.version}-samples-google-portlet.war"
tofile="${deploy.dir}/samples-google-portlet.war"/>
<copy
file="${source.dir}/samples/target/portlet-samples-${maven.version}-samples-remotecontroller-portlet.war"
tofile="${deploy.dir}/samples-remotecontroller-portlet.war"/>
<copy
file="${source.dir}/samples/target/portlet-samples-${maven.version}-samples-shoppingcart-portlet.war"
tofile="${deploy.dir}/samples-shoppingcart-portlet.war"/>
+ <copy
file="${source.dir}/samples/target/portlet-samples-${maven.version}-samples-jsp-portlet.war"
tofile="${deploy.dir}/samples-jsp-portlet.war"/>
</target>
<target name="__package-distrib">
Modified:
modules/portlet/trunk/build/distrib/jboss-4.2/server/default/deploy/jboss-web.deployer/conf/web.xml
===================================================================
---
modules/portlet/trunk/build/distrib/jboss-4.2/server/default/deploy/jboss-web.deployer/conf/web.xml 2008-03-02
22:25:32 UTC (rev 10175)
+++
modules/portlet/trunk/build/distrib/jboss-4.2/server/default/deploy/jboss-web.deployer/conf/web.xml 2008-03-02
23:21:50 UTC (rev 10176)
@@ -306,7 +306,7 @@
<init-param>
<description>Portlet standard tlds</description>
<param-name>tagLibJar2</param-name>
-
<param-value>../simple-portal/portlet-portlet-2.0-SNAPSHOT.jar</param-value>
+
<param-value>../simple-portal/lib/portlet-portlet-2.0-SNAPSHOT.jar</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
Modified: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo.jsp
===================================================================
---
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo.jsp 2008-03-02
22:25:32 UTC (rev 10175)
+++
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/demo.jsp 2008-03-02
23:21:50 UTC (rev 10176)
@@ -19,6 +19,7 @@
<jbp:portlet name="GoogleMap"
applicationName="samples-google-portlet"/>
<jbp:portlet name="GoogleWeather"
applicationName="samples-google-portlet"/>
<jbp:portlet name="Catalog"
applicationName="samples-shoppincart-portlet"/>
+ <jbp:portlet name="JSPPortlet"
applicationName="samples-jsp-portlet"/>
</jsp:attribute>
</jbp:layout1>
</portal:page>
Modified: modules/portlet/trunk/samples/pom.xml
===================================================================
--- modules/portlet/trunk/samples/pom.xml 2008-03-02 22:25:32 UTC (rev 10175)
+++ modules/portlet/trunk/samples/pom.xml 2008-03-02 23:21:50 UTC (rev 10176)
@@ -32,6 +32,7 @@
<descriptor>src/assemble/samples-shoppingcart-portlet.xml</descriptor>
<descriptor>src/assemble/samples-google-portlet.xml</descriptor>
<descriptor>src/assemble/samples-remotecontroller-portlet.xml</descriptor>
+
<descriptor>src/assemble/samples-jsp-portlet.xml</descriptor>
</descriptors>
</configuration>
</plugin>
Copied: modules/portlet/trunk/samples/src/assemble/samples-jsp-portlet.xml (from rev
10175, modules/portlet/trunk/samples/src/assemble/samples-basic-portlet.xml)
===================================================================
--- modules/portlet/trunk/samples/src/assemble/samples-jsp-portlet.xml
(rev 0)
+++ modules/portlet/trunk/samples/src/assemble/samples-jsp-portlet.xml 2008-03-02 23:21:50
UTC (rev 10176)
@@ -0,0 +1,22 @@
+<assembly>
+ <id>samples-jsp-portlet</id>
+ <formats>
+ <format>war</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>src/main/artifacts/jsp-portlet-war</directory>
+ <outputDirectory></outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>target/classes</directory>
+ <outputDirectory>WEB-INF/classes</outputDirectory>
+ <includes>
+ <include>org/jboss/portal/portlet/samples/jsp/**</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+
+</assembly>
\ No newline at end of file
Added:
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/WEB-INF/jsp/view.jsp
===================================================================
--- modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/WEB-INF/jsp/view.jsp
(rev 0)
+++
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/WEB-INF/jsp/view.jsp 2008-03-02
23:21:50 UTC (rev 10176)
@@ -0,0 +1,64 @@
+<%@ page %>
+<%--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~ 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. ~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>
+
+<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>
+<%@ page isELIgnored="false" %>
+
+<portlet:defineObjects/>
+
+<table border="0" cellspacing="2" cellpadding="2">
+ <tr>
+ <td align="center"><a
href="http://portal.demo.jboss.com" target="_blank"><img
+ src="<%= renderRequest.getContextPath() %>/images/dodemo.gif"
border="0"
+ alt="Try the latest release of JBoss Portal, live and
online."></a>
+ <a
href="http://labs.jboss.com/portal/jbossportal/download/index.html&q...
target="_blank"><img
+ src="<%= renderRequest.getContextPath()
%>/images/getcode.gif" border="0"
+ alt="Download JBoss Portal and have it up and running in
minutes."></a>
+ <a href="http://www.portletswap.com"
target="_blank"><img
+ src="<%= renderRequest.getContextPath()
%>/images/accessorize.gif" border="0"
+ alt="Download portlets and layouts for your new JBoss Portal
installation."></a></td>
+ </tr>
+ <tr>
+ <td></td>
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate">
+ <font class="portlet-font">This is an installation of
<b>JBoss Portlet Container 2.0
+ </b>. You may
+ log in at any time, using the <i>Login</i> link at the top-right
of this page, with the following
+ credentials:</font>
+ </td>
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate" align="center">
+ <b>user/user</b> or <b>admin/admin</b>
+ </td>
+ </tr>
+ <tr>
+ <td align="center">
+ If you are in need of guidance with regards to navigating, configuring, or
operating the portal, please view
+ our <a
href="http://labs.jboss.com/portal/jbossportal/docs/index.html"
target="_blank">online documentation</a>.
+ </td>
+ </tr>
+</table>
Added:
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/WEB-INF/portlet.xml
===================================================================
--- modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/WEB-INF/portlet.xml
(rev 0)
+++
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/WEB-INF/portlet.xml 2008-03-02
23:21:50 UTC (rev 10176)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<portlet-app
+
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1...
http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+ version="1.0">
+ <portlet>
+ <description>Simple JSP portlet</description>
+ <portlet-name>JSPPortlet</portlet-name>
+ <display-name>JSP Portlet</display-name>
+
<portlet-class>org.jboss.portal.portlet.samples.jsp.JSPPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Greetings!</title>
+ <keywords>sample,test</keywords>
+ </portlet-info>
+ </portlet>
+</portlet-app>
Added: modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/WEB-INF/web.xml
(rev 0)
+++
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/WEB-INF/web.xml 2008-03-02
23:21:50 UTC (rev 10176)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2008, 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<!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/>
+
Added:
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/images/accessorize.gif
===================================================================
(Binary files differ)
Property changes on:
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/images/accessorize.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/images/dodemo.gif
===================================================================
(Binary files differ)
Property changes on:
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/images/dodemo.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/images/getcode.gif
===================================================================
(Binary files differ)
Property changes on:
modules/portlet/trunk/samples/src/main/artifacts/jsp-portlet-war/images/getcode.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/jsp/JSPPortlet.java
===================================================================
---
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/jsp/JSPPortlet.java
(rev 0)
+++
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/jsp/JSPPortlet.java 2008-03-02
23:21:50 UTC (rev 10176)
@@ -0,0 +1,45 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.portlet.samples.jsp;
+
+import javax.portlet.PortletException;
+import javax.portlet.RenderResponse;
+import javax.portlet.RenderRequest;
+import javax.portlet.UnavailableException;
+import javax.portlet.GenericPortlet;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:roy@jboss.org">Roy Russo</a>
+ */
+public class JSPPortlet extends GenericPortlet
+{
+ private static final String JSP_PATH = "/WEB-INF/jsp";
+
+ protected void doView(RenderRequest rRequest, RenderResponse rResponse) throws
PortletException, IOException, UnavailableException
+ {
+ rResponse.setContentType("text/html");
+ javax.portlet.PortletRequestDispatcher pRD =
this.getPortletContext().getRequestDispatcher(JSP_PATH + "/view.jsp");
+ pRD.include(rRequest, rResponse);
+ }
+}
\ No newline at end of file