Hi, Firstly, thank you very much for your help so far Brent.
Perhaps I am not explaining myself properly: I am fully versed in the JSR-168 portlet specification and all the associated portlet tags. However this is NOT a portlet issue, but a portal one. What I was trying to do, and now have achieved, is embed pluto into my own web application. I have several JSR-168 portlets that another developer has developed AND TESTED on a vanilla pluto portal installation. (i.e. they use "defineobjects" in them) I wished to embed these via the portlet tags exclusively. After much frustration from having to build pluto from scratch, using something other than maven to make it spring 2.0 compatible, I have finally got there. It is working. However, during one part of my frustration, I discovered a null pointer exception. This was solved by placing the scriptlet: <% new PortalEnvironment(request, response); %> Before the PLUTO tag <pluto:portlet>. (and just for my own piece of mind, I tried adding defineobjects instead of this and, of course, I was back to the same null pointer exception :o) Now I assume that it is ME who is making the mistake here and not a bug in pluto. However, the latter is possible of course so I thought it was worth mentioning to the rest of the community. Please note I am EMBEDDING pluto into my web app. This means that my jsp pages call the pluto tag independently of the pluto portal. I am just using the driver. (i.e. PortalDriverServlet, PortalStartupListener and the pluto tags) I don't know if this is "best practice" or even if it is suppose to work this way, but I have a (not exhaustively "pluto-tested" of course) working version currently. I would not have even wondered about any of this if it wasn't for needing that scriptlet!. :) Anyways, thanks again for your help. Shane > -----Original Message----- > From: Brent Thomas [mailto:[EMAIL PROTECTED] > Sent: Thursday, 4 May 2006 12:56 a.m. > To: [email protected]; [email protected] > Subject: RE: Embedding Pluto > > The tag <portlet:defineObjects/> is part of the portlet spec > since 1.0. > From the Portlet spec 1.0: > > <quote> > PLT.22.1 defineObjects Tag > The defineObjects tag must define the following variables in the JSP > page: > * RenderRequest renderRequest > * RenderResponse renderResponse > * PortletConfig portletConfig > These variables must reference the same Portlet API objects stored in > the request object > of the JSP as defined in the PLT.16.3.1 Included Request Attributes > Section. > A JSP using the defineObjects tag may use these variables from > scriptlets throughout > the page. > </quote> > > Brent > > ----- > Brent Thomas > Acutely Obtuse, Inc. > [EMAIL PROTECTED] > > ----- Original message ----- > From: "Shane Paul" <[EMAIL PROTECTED]> > To: [email protected], [email protected] > Date: Tue, 2 May 2006 10:00:53 +1200 > Subject: RE: Embedding Pluto > > Hi Patrick, > > Thanks for the response, but I am a little confused by your response. > > I "discovered" this fix by tracing the source of a null pointer > exception. (i.e. as opposed to documentation) I know this is > (probably?) > a hack and that I am missing something here, but I am not sure what. > Just wanted a heads up from someone who knows about how 1.1 works. > > The main confusing bit is that <% new PortalEnvironment(request, > response); %> has only request/response dependencies and > could have been > handled via a filter perhaps? > > Anyways, my question was essentially: "Is this a hack? If so, > what am I > doing wrong?" > > > Shane > > > -----Original Message----- > > From: Patrick Huber [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, 2 May 2006 3:38 a.m. > > To: [email protected] > > Subject: Re: Embedding Pluto > > > > Hi Shane > > > > Usually, you'd put this somewhere above the first portlet > tag of a jsp > > page: <portlet:defineObjects/>. I haven't seen your scriptlet > > before... it's probably doing the same. Using the above tag is the > > recommended way of initializing portletRequest, > portletResponse and a > > few other objects. > > > > Patrick > > > > 2006/4/30, Shane Paul <[EMAIL PROTECTED]>: > > > Well that was a mission, but it is done: > > > > > > Built the pluto driver+extras from scratch using eclipse > and made it > > > compatible with spring 2.0M3. > > > Embedded it into our website using nothing more than the > > portlet tags, > > > as originally hoped. > > > I guess now you know it can be done. Writing some docs on > > what I did for > > > my personal and company records. If anyone is interested, > just ask. > > > > > > Very happy. :) > > > > > > The only thing I cannot work out is having to add: > > > <% new PortalEnvironment(request, response); %> > > > To the jsp file before using the portlet tag. I > understand it places > > > "things" into the request and/or session scope, but I am > > not sure why > > > this does not happen when the tag is called. Will most > > likely edit the > > > source again to add this. > > > > > > cheers. > > > > > > Shane > > > > > > > > > > > > > > > > > > -- > > "I love deadlines. I like the whooshing sound they make as they fly > > by." -- Douglas Adams > > >
