Re: Is PortletServlet Required?

James Cook <[email protected]> Tue, 27 Jul 2010 20:07:06 -0400
Newsgroups gmane.comp.jakarta.pluto.user
Message-ID <[email protected]>
--0016e659f5f01bb593048c676792
Content-Type: text/plain; charset=ISO-8859-1

After looking at the code a bit more, my mentions of PortletServlet should
be replaced with PortalDriverServlet.

-- jim

On Tue, Jul 27, 2010 at 7:48 PM, James Cook <[email protected]> wrote:

> I would like to embed the pluto container (or portlet driver) in my web
> application. My web application is based on Spring, so I thought that might
> make this easier, but now I am not so sure. Basically, a lot of my Spring
> goodness in my webapp comes from the fact that I am using Spring's
> DispatcherServlet as the basis for my MVC framework. I have the pluto spring
> configuration bootstrapping and I have added the PortletFilter and it seems
> to start up fine.
>
> However, when I attempt to embed a portlet using this code:
>
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
> <%@ taglib prefix="pluto" uri="http://portals.apache.org/pluto" %>
> <%@ taglib prefix="portlet" uri="http://java.sun.com/portlet" %>
> <portlet:defineObjects />
> <html>
> <head><title>Simple jsp page</title></head>
> <body>
>     Place your content here
>
>     <pluto:portlet portletId="rt-portlets.slideshow">
>         <div class="portlet" id="rt-portlets.slideshow">
>             <div class="header">
>                 <h2 class="title"><pluto:title></pluto:title></h2>
>             </div>
>             <div class="body">
>                 <pluto:render></pluto:render>
>             </div>
>         </div>
>     </pluto:portlet>
> </body>
>
> </html>
>
> I receive errors because the portlet registry has no indication of my
> portlet registered. It appears that the registration of servlets takes place
> during the initialization of the PortletServlet.
>
> If I have to add the PortletServlet and map that to my web app's context
> path, does this mean I can no longer use Spring's dispatcher servlet? If so,
> doesn't this undermine the ability to embed the pluto portlet driver in an
> existing web application?
>
> -- thanks for any guidance
>

--0016e659f5f01bb593048c676792
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

After looking at the code a bit more, my mentions of PortletServlet should =
be replaced with PortalDriverServlet.<div><br></div><div>-- jim<br><br><div=
 class=3D"gmail_quote">On Tue, Jul 27, 2010 at 7:48 PM, James Cook <span di=
r=3D"ltr">&lt;<a href=3D"mailto:[email protected]">[email protected]=
m</a>&gt;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">I would like to embed the pluto container (=
or portlet driver) in my web application. My web application is based on Sp=
ring, so I thought that might make this easier, but now I am not so sure. B=
asically, a lot of my Spring goodness in my webapp comes from the fact that=
 I am using Spring&#39;s DispatcherServlet as the basis for my MVC framewor=
k. I have the pluto spring configuration bootstrapping and I have added the=
 PortletFilter and it seems to start up fine.<div>


<br></div><div>However, when I attempt to embed a portlet using this code:<=
/div><div><br></div><div><div>&lt;%@ page contentType=3D&quot;text/html;cha=
rset=3DUTF-8&quot; language=3D&quot;java&quot; %&gt;</div><div>&lt;%@ tagli=
b prefix=3D&quot;c&quot; uri=3D&quot;<a href=3D"http://java.sun.com/jsp/jst=
l/core" target=3D"_blank">http://java.sun.com/jsp/jstl/core</a>&quot; %&gt;=
</div>


<div>&lt;%@ taglib prefix=3D&quot;pluto&quot; uri=3D&quot;<a href=3D"http:/=
/portals.apache.org/pluto" target=3D"_blank">http://portals.apache.org/plut=
o</a>&quot; %&gt;</div><div>&lt;%@ taglib prefix=3D&quot;portlet&quot; uri=
=3D&quot;<a href=3D"http://java.sun.com/portlet" target=3D"_blank">http://j=
ava.sun.com/portlet</a>&quot; %&gt;</div>


<div>&lt;portlet:defineObjects /&gt;</div><div>&lt;html&gt;</div><div>&lt;h=
ead&gt;&lt;title&gt;Simple jsp page&lt;/title&gt;&lt;/head&gt;</div><div>&l=
t;body&gt;</div><div>=A0=A0 =A0Place your content here</div><div><br></div>=
<div>


=A0=A0 =A0&lt;pluto:portlet portletId=3D&quot;rt-portlets.slideshow&quot;&g=
t;</div><div>=A0=A0 =A0 =A0 =A0&lt;div class=3D&quot;portlet&quot; id=3D&qu=
ot;rt-portlets.slideshow&quot;&gt;</div><div>=A0=A0 =A0 =A0 =A0 =A0 =A0&lt;=
div class=3D&quot;header&quot;&gt;</div>


<div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&lt;h2 class=3D&quot;title&quot;&gt;=
&lt;pluto:title&gt;&lt;/pluto:title&gt;&lt;/h2&gt;</div><div>=A0=A0 =A0 =A0=
 =A0 =A0 =A0&lt;/div&gt;</div><div>=A0=A0 =A0 =A0 =A0 =A0 =A0&lt;div class=
=3D&quot;body&quot;&gt;</div><div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&lt;plu=
to:render&gt;&lt;/pluto:render&gt;</div>


<div>=A0=A0 =A0 =A0 =A0 =A0 =A0&lt;/div&gt;</div><div>=A0=A0 =A0 =A0 =A0&lt=
;/div&gt;</div><div>=A0=A0 =A0&lt;/pluto:portlet&gt;</div><div>&lt;/body&gt=
;</div><div><br></div><div>&lt;/html&gt;</div></div><div><br></div><div>I r=
eceive errors because the portlet registry has no indication of my portlet =
registered. It appears that the registration of servlets takes place during=
 the initialization of the PortletServlet.</div>


<div><br></div><div>If I have to add the PortletServlet and map that to my =
web app&#39;s context path, does this mean I can no longer use Spring&#39;s=
 dispatcher servlet? If so, doesn&#39;t this undermine the ability to embed=
 the pluto portlet driver in an existing web application?</div>


<div><br></div><div>-- thanks for any guidance</div>
</blockquote></div><br></div>

--0016e659f5f01bb593048c676792--