From portal-commits at lists.jboss.org Tue Jan 23 08:00:22 2007 Content-Type: multipart/mixed; boundary="===============3222760448628227546==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r6074 - in trunk/core-samples/src/main/org/jboss/portal/core/portlet: plugins and 1 other directory. Date: Tue, 23 Jan 2007 08:00:22 -0500 Message-ID: --===============3222760448628227546== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-01-23 08:00:22 -0500 (Tue, 23 Jan 2007) New Revision: 6074 Added: trunk/core-samples/src/main/org/jboss/portal/core/portlet/plugins/ trunk/core-samples/src/main/org/jboss/portal/core/portlet/plugins/Header= ContentPortlet.java Log: added header content portlet to core-samples Added: trunk/core-samples/src/main/org/jboss/portal/core/portlet/plugins/He= aderContentPortlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-samples/src/main/org/jboss/portal/core/portlet/plugins/Heade= rContentPortlet.java (rev 0) +++ trunk/core-samples/src/main/org/jboss/portal/core/portlet/plugins/Heade= rContentPortlet.java 2007-01-23 13:00:22 UTC (rev 6074) @@ -0,0 +1,58 @@ +/*************************************************************************= ***** + * 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.core.portlet.plugins; + +import org.apache.log4j.Logger; + +import javax.portlet.GenericPortlet; +import javax.portlet.PortletException; +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; +import java.io.IOException; +import java.io.Writer; + +/* + * Portlet to demonstrate the declarative header content feature. + *

This portlet injects css into the html HEAD tag via jboss-portlet.xm= l

+ * + * @author Martin Holzner + * @version $Revision: 5448 $ +*/ + +public class HeaderContentPortlet extends GenericPortlet +{ + private static Logger log =3D Logger.getLogger(HeaderContentPortlet.cla= ss); + + public void doView(RenderRequest req, RenderResponse res) + throws PortletException, IOException + { + log.debug("doView(): ..."); + + res.setContentType("text/html"); + Writer writer =3D res.getWriter(); + writer.write("
"); + writer.write("

"); + writer.flush(); + writer.close(); + } +} Property changes on: trunk/core-samples/src/main/org/jboss/portal/core/port= let/plugins/HeaderContentPortlet.java ___________________________________________________________________ Name: svn:executable + * --===============3222760448628227546==--