You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-user@portals.apache.org by James Cook <jc...@tracermedia.com> on 2010/07/28 01:48:41 UTC

Is PortletServlet Required?

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

Re: Is PortletServlet Required?

Posted by James Cook <jc...@tracermedia.com>.
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 <jc...@tracermedia.com> 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
>