Unfortunately, I *am* using JSP as my main templating system.  Still,
the content retrieved by my request dispatcher (EcsServletElement) shows
up above all of the portlets, just ahead of the portlet table.  This
appears to be a layout bug in handling the EcsServletElement.  I will
look into it.

For anyone else interested in trying to replicate this bug, here is the
significant code from my portlet, taken pretty much straight out of the
how-to:


        ElementContainer base = new ElementContainer();
        CapabilityMap cap =
CapabilityMapFactory.getCapabilityMap(aRunData);

        if( cap.getPreferredType().equals(MimeType.HTML) ){
            base.addElement( new EcsServletElement( aRunData,
"/templates/jsp/portlets/html/DivineForward.jsp" ) );
        } else if( cap.getPreferredType().equals(MimeType.WML) ) {
            base.addElement( new EcsServletElement( aRunData,
"/templates/jsp/portlets/wml/DivineForward.jsp" ) );
        }

        return(base);



> -----Original Message-----
> From: David Sean Taylor
> 
> You can't currently take the output of a JSP and include (via 
> a requestDispatcher) into a velocity template.
> This is a known problem. So if you are using a velocity 
> template (Home.vm) to generate your psml content, then you 
> can't use portlets that get their content from request 
> dispatchers, like the EcsServletElement is doing with your JSP.
> 
> If you don't mind using JSP as your main templating system, 
> simply modify the TR.p
> 
> services.TemplateService.default.extension=jsp
> 
> instead of
> 
> services.TemplateService.default.extension=vm
> 
> Then your EcsServletElement portlet should work fine.
> 
> As for Ecs being deprecated, its not. 
> We are working towards deprecating it sometime 'soon', but it 
> is still very much in use in both Jetspeed and Turbine
> 
> -------------------------------------
> David Sean Taylor
> [EMAIL PROTECTED]
> -------------------------------------
> http://jakarta.apache.org/jetspeed
> -------------------------------------
>  
> 
>  
> 
> > -----Original Message-----
> > From: McClelland, Mark [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 19, 2001 4:13 PM
> > To: [EMAIL PROTECTED]
> > Subject: Alternatives to EcsServletElement for externalization
> > 
> > 
> > Within the EcsServletElement class, I found the following comment:
> > 
> >  * NOTE: The use of Ecs for aggregating portlet content is 
> deprecated!
> >  *       This utility class will be removed once we don't 
> have the ecs
> >  *       dependency any more.
> > 
> > I gather that the EcsServletElement should no longer be used.  But I
> > like the idea of externalizing content generation to a JSP, 
> so that a
> > non-developer can change the content of a portlet using the HTML/JSP
> > design tool of their choice.  Is there another way to 
> accomplish this?
> > I looked at the ServletInvokerPortlet that comes with 
> Jetspeed, and it
> > also uses EcsServletElement.  What alternatives do I have?
> > 
> > 
> > Background info on how I arrived at this question, for those 
> > interested:
> > 
> >   I created a portlet that attempts to externalize content 
> > generation to
> > a JSP, as shown in the "How to Write a Portlet" doc.  This portlet
> > creates an org.apache.ecs.ElementContainer, puts an 
> EcsServletElement
> > into the ElementContainer, and returns the ElementContainer.  
> > When I run
> > this portlet, the content from my external JSP is generated, but it
> > appears above all of the portlets, instead of inside my portlet.  I
> > simplified my JSP as much as possible, confirming for myself that it
> > wasn't an HTML problem.  I then returned the 
> EcsServletElement instead
> > of the ElementContainer (both of which extend ConcreteElement), and
> > still my portlet content is displaying before the portlets table.
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: 
> [EMAIL PROTECTED]
> > 
> > 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to