Hi,

I also want to do the same thing. I want to put the "login" portlet in the decorator section.

I dont know if it is possible either.

Any help or suggestions would really help  ...

Thanks,
Amit

----Original Message Follows----
From: zazo <[EMAIL PROTECTED]>
Reply-To: "Jetspeed Developers List" <jetspeed-dev@jakarta.apache.org>
To: <jetspeed-dev@jakarta.apache.org>
Subject: Displaying portlet in decorator
Date: Wed, 13 Apr 2005 19:16:21 +0200

Hi,

Is there any way to display a portlet in the decorator built part of
the page (the portlet is not included in a psml file)?

This is what I do in my decorator file :
---
PageImpl searchPage = (PageImpl) rootFolder.getPage("search.psml");

FragmentImpl searchFragment = (FragmentImpl)
searchPage.getFragmentById("simple-search-1");

jetspeed.include(searchFragment);
---
First I locate psml file (search.psml) with portlet in it
(fragment's id is 'simple-search-1'). Finally, I use 'include' on
fragment I have found. The 'include' function is taken from
JetspeedPowerTool class.

After all that I am able to see my search portlet just between some
menus my decorator has built, but... portlets from currnet psml file
cause some seriuos errors during rendering.

The stack trace is (sorry for pasting huge fragment):
-----------------------------------------------------------------
 JetspeedRequestDispatcher failed to include servlet resources.
(details below)
Exception: org.apache.jasper.JasperException
Message: null

Stack Trace:

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)

org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)

org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510)

org.apache.jetspeed.dispatcher.JetspeedRequestDispatcher.include(JetspeedRequestDispatcher.java:65)

org.apache.jetspeed.velocity.JetspeedPowerTool.decorateAndIncludePortlet(JetspeedPowerTool.java:774)

org.apache.jetspeed.velocity.JetspeedPowerTool.decorateAndInclude(JetspeedPowerTool.java:660)

org.apache.jsp.WEB_002dINF.templates.layout.html.columns.layout_jsp._jspService(layout_jsp.java:631)
   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)

org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)

org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510)

org.apache.jetspeed.dispatcher.JetspeedRequestDispatcher.include(JetspeedRequestDispatcher.java:65)

org.apache.portals.bridges.common.GenericServletPortlet.doView(GenericServletPortlet.java:344)

org.apache.jetspeed.portlets.layout.LayoutPortlet.doView(LayoutPortlet.java:176)

org.apache.jetspeed.portlets.layout.MultiColumnPortlet.doView(MultiColumnPortlet.java:109)
   javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:247)
   javax.portlet.GenericPortlet.render(GenericPortlet.java:175)

org.apache.jetspeed.container.JetspeedContainerServlet.doGet(JetspeedContainerServlet.java:235)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)

org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)

org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510)

org.apache.jetspeed.container.invoker.ServletPortletInvoker.invoke(ServletPortletInvoker.java:213)

org.apache.jetspeed.container.invoker.ServletPortletInvoker.render(ServletPortletInvoker.java:124)

org.apache.pluto.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:103)

org.apache.jetspeed.container.JetspeedPortletContainerWrapper.renderPortlet(JetspeedPortletContainerWrapper.java:88)

org.apache.jetspeed.aggregator.impl.PortletRendererImpl.renderNow(PortletRendererImpl.java:110)

org.apache.jetspeed.aggregator.impl.PageAggregatorImpl.build(PageAggregatorImpl.java:251)

org.apache.jetspeed.aggregator.AggregatorValve.invoke(AggregatorValve.java:48)

org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(JetspeedPipeline.java:209)

org.apache.jetspeed.pipeline.valve.impl.ActionValveImpl.invoke(ActionValveImpl.java:117)

org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(JetspeedPipeline.java:209)

org.apache.jetspeed.container.ContainerValve.invoke(ContainerValve.java:76)

org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(JetspeedPipeline.java:209)

org.apache.jetspeed.profiler.impl.ProfilerValveImpl.invoke(ProfilerValveImpl.java:133)

org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(JetspeedPipeline.java:209)

org.apache.jetspeed.security.impl.PasswordCredentialValveImpl.invoke(PasswordCredentialValveImpl.java:139)

org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(JetspeedPipeline.java:209)

org.apache.jetspeed.security.impl.AbstractSecurityValve$1.run(AbstractSecurityValve.java:108)
   java.security.AccessController.doPrivileged(Native Method)
   javax.security.auth.Subject.doAsPrivileged(Subject.java:437)

org.apache.jetspeed.security.impl.AbstractSecurityValve.invoke(AbstractSecurityValve.java:102)

org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(JetspeedPipeline.java:209)

org.apache.jetspeed.container.url.impl.PortalURLValveImpl.invoke(PortalURLValveImpl.java:55)

org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(JetspeedPipeline.java:209)

org.apache.jetspeed.capabilities.impl.CapabilityValveImpl.invoke(CapabilityValveImpl.java:127)

org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(JetspeedPipeline.java:209)

org.apache.jetspeed.localization.impl.LocalizationValveImpl.invoke(LocalizationValveImpl.java:73)

org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(JetspeedPipeline.java:209)

org.apache.jetspeed.pipeline.JetspeedPipeline.invoke(JetspeedPipeline.java:191)

org.apache.jetspeed.engine.AbstractEngine.service(AbstractEngine.java:259)

org.apache.jetspeed.engine.JetspeedServlet.doGet(JetspeedServlet.java:225)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:150)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:54)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)

org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
   java.lang.Thread.run(Thread.java:534)
javax.portlet.PortletException
-----------------------------------------------------------------

And this is fragment from jetspeed/log:

-----------------------------------------------------------------
org.apache.jetspeed.velocity.JetspeedPowerTool - JetspeedPowerTool
failed to retreive the current PortletEntity.
java.lang.IllegalArgumentException:
org.apache.jetspeed.container.window.impl.PortletWindowAccessorImpl.getPortletWindow(Fragment
fragment) requires a non-null org.apache.jetspeed.om.page.Fragment
as an argument.
java.lang.IllegalArgumentException:
org.apache.jetspeed.container.window.impl.PortletWindowAccessorImpl.getPortletWindow(Fragment
fragment) requires a non-null org.apache.jetspeed.om.page.Fragment
as an argument.
        at org.apache.jetspeed.util.ArgUtil.assertNotNull(ArgUtil.java:87)
        at
org.apache.jetspeed.container.window.impl.PortletWindowAccessorImpl.getPortletWindow(PortletWindowAccessorImpl.java:90)
        at
org.apache.jetspeed.velocity.JetspeedPowerTool.getCurrentPortletEntity(JetspeedPowerTool.java:389)
(...)
------------------------------------------------------------------

I am using Jetspeed-2-M1 and JBoss4.0.1sp1.

Any suggestions will be appreciated.

Thank you in advance.

Best regards,

Tomasz


--------------------------------------------------------------------- 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