At 13:24 02/16/01, [EMAIL PROTECTED] wrote:
>Hi All,
>
>I'm testing the last Velocity layout support from the 02/15/2001 cvs
>stuff. When I'm using EscServeletElement in my portlet, this portlet is
>rendered before my top navigation HTML tab.
>
>The same portlet works fine when I use the Jsp layout (the default one).
>In this case, the portlet output is place into the correct portlet tab.
>Have you already test this situation ?
>If yes & works fine, can you send me the TurbineResource.properties to
>check if I forget something.
See the thread "Velocity support updated" (12. Feb. 2001), I explained
already there, what the problem and possible fixes are.
ingo.
>My second question is : How I can use the Turbine servlet within a portlet ?
>I expect with EcsServletElement but I get an exception
>(IllegalStateException : setting buffer to the writer at
>org.apache.tomcat.core.ResponseImpl.setBufferSize(...)) only when I'm
>using the Turbine servlet within my "servlet" portlet.
>Other servlets works fine (based on jsp layout) with this portlet.
>
>
>Many thanks in advance,
>Christophe
>
>
>In the jetspeed-config.jcfg, I have :
>-------------------------------------
>...
>
> <portlet-entry type="abstract" name="servlet" >
> <classname>lu.cri.portal.portlets.ServletPortlet</classname>
> </portlet-entry>
>
>
> <portlet-entry type="ref" parent="servlet" name="testservlet">
> <parameter name="url" value="/portal/template/Login"/>
> <meta-info>
> <title>test</title>
> <description>test</description>
> </meta-info>
> </portlet-entry>
>
>...
>
>
>My portlet code is
>----------------------
>
>package lu.cri.portal.portlets;
>
>import org.apache.jetspeed.portal.portlets.AbstractPortlet;
>
>/**
> * Title:
> * Description:
> * Copyright: Copyright (c) 2001
> * Company:
> * @author
> * @version 1.0
> */
>import org.apache.ecs.ConcreteElement;
>import org.apache.ecs.ElementContainer;
>import org.apache.ecs.StringElement;
>
>import org.apache.jetspeed.portal.*;
>import org.apache.jetspeed.util.*;
>
>import org.apache.turbine.util.*;
>
>import org.apache.jetspeed.portal.portlets.AbstractPortlet;
>import org.apache.jetspeed.util.servlet.EcsServletElement;
>
>import org.apache.jetspeed.capability.*;
>
>public class ServletPortlet extends AbstractPortlet {
>
> public ConcreteElement getContent(RunData data) {
> PortletConfig pc = this.getPortletConfig();
> String servletURL = null;
>
> try {
> ElementContainer base = new ElementContainer();
> CapabilityMap map = CapabilityMapFactory.getCapabilityMap(data);
>
> servletURL = (String) this.getPortletConfig().getInitParameter("url");
> System.out.println("SERVLET PORTLET : " + servletURL);
>
>// data.getRequest().setAttribute("test", "a Text");
>
> if ( map.getPreferredType().equals(MimeType.HTML)) {
> base.addElement(new EcsServletElement(data, servletURL));
> }
> else if (map.getPreferredType().equals(MimeType.WML)) {
> base.addElement(new EcsServletElement(data, servletURL));
> }
>
>
>
> return ( base);
> }
> catch (Exception e) {
> String message = "TestPortlet : Error invoking " + servletURL + " : " +
> e.getMessage();
> Log.error( message, e);
> return new StringElement( message );
> }
> }
> public boolean supportsType(MimeType mimeType) {
> return MimeType.HTML.equals(mimeType) ||
> MimeType.WML.equals(mimeType);
>
> }
>}
>__________________________________________________________________
>Get your own FREE, personal Netscape Webmail account today at
>http://webmail.netscape.com/
>
>
>--
>--------------------------------------------------------------
>To subscribe: [EMAIL PROTECTED]
>To unsubscribe: [EMAIL PROTECTED]
>Search: <http://www.mail-archive.com/jetspeed@list.working-dogs.com/>
>List Help?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/jetspeed@list.working-dogs.com/>
List Help?: [EMAIL PROTECTED]