Just a shot in the dark but did you override init(PortletConfig
config) and forget to call super.init(config)?
I did that once and then had the behaviour you mention...
On 8/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I recently installed Jetspeed 2.1.2 on Linux with a MySQL DB and everything
> is working fine with one exception. I am encountering null pointers whenever
> I attempt to access the members of the PortletContext in my own portlets.
> Here's a simple example that will fail:
>
>
> public class GraphListPortlet extends GenericPortlet {
> protected void doView(RenderRequest request, RenderResponse response)
> throws PortletException, IOException
> {
> response.setContentType("text/html");
>
> PortletRequestDispatcher prd =
> getPortletContext().getRequestDispatcher("/jsp/view.jsp");
>
> prd.include(request, response);
>
>
> }
> }
>
>
> The PortletRequestDispatcher will be received as null here and the include
> method will throw the exception. Likewise if I attempt to access
> getPortletContext().getPortletContextName() it will also throw a
> NullPointerException. I have stepped through the portlet using the Eclipse
> remote debug tool for Tomcat and have noticed that the servletContext inside
> the JetspeedPortletConfig object is null, which seems to at least be the
> source of the getPorletContextName() problem (line 257 of
> JetspeedPortletContext.java attempts to access a member of that
> servletContext class). Any ideas on why this isn't initializing correctly? I
> haven't been able to find any problems with my portlet.xml or web.xml.
>
> --
> This message was sent on behalf of [EMAIL PROTECTED] at openSubscriber.com
> http://www.opensubscriber.com/messages/[email protected]/topic.html
>
> ---------------------------------------------------------------------
> 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]