problem executing a portlet JSP

Discussions

Web tier: servlets, JSP, Web frameworks: problem executing a portlet JSP

  1. problem executing a portlet JSP (3 messages)

    While trying to execute a simple portlet JSP , I am getting following error. So can anyone tell me thereason for this error.the error comes , if i add <portletAPI:init /> codeset

    [4/28/04 15:56:58:348 EDT] 764eb91 WebGroup I SRVE0180I: [Helloworld] [/Helloworld] [Servlet.LOG]: /helloworld/jsp/view.jsp: init
    [4/28/04 15:56:58:645 EDT] 764eb91 WebGroup E SRVE0026E: [Servlet Error]-[]: java.lang.NullPointerException
    at java.util.Hashtable.put(Hashtable.java(Compiled Code))
    at org.apache.jasper.runtime.PageContextImpl.setAttribute(PageContextImpl.java:269)
    at com.ibm.wps.pe.pc.legacy.tags.InitTag.doStartTag(InitTag.java:77)
    at org.apache.jsp._view._jspService(_view.java:80)
    at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:357)
    at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:675)
    at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:773)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)
    at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
    at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
    at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
    at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:431)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)

    Threaded Messages (3)

  2. problem executing a portlet JSP[ Go to top ]

    It looks like a bug somewhere in the code, related to this:
    org.apache.jasper.runtime.PageContextImpl.setAttribute(PageContextImpl.java:269)
    If you read the documentation of PageContext, it states that the setAttribute() method cannot have null names or values, which is unlike all the other setAttribute() methods in the Servlet API.

    So, something somewhere is null, probably a missing or mispelled configurating value.
  3. problem executing a portlet JSP[ Go to top ]

    in full process i added the JSP only and the file is like below:

    <%@ taglib uri='/WEB-INF/tld/portlet.tld' prefix='portletAPI'%>
    <portletAPI:init/>
    <HEAD>
    <META name="GENERATOR" content="IBM WebSphere Studio">
    </HEAD>

    Your memo contents are
     <%//=portletRequest.getData().getAttribute("memo") %>

    -------

    The part of init tage in portlet.tld is like below:

    <tag>
    <name>init</name>
    <tagclass>com.ibm.wps.pe.pc.legacy.tags.InitTag</tagclass>
    <teiclass>com.ibm.wps.pe.pc.legacy.tags.InitTag$TEI</teiclass>
    <bodycontent>JSP</bodycontent>
    </tag>

    -------
    So in whole process , my code is only the view.jsp.And the problem comes when I add <portletAPI:init/> in JSP. Portlet.tld comes with websphere server, InitTag.class is inside the jar file comes from websphere.I have wps.jar,portlet-api.jar,j2ee.jar,dynacache.jar in my classpath. So probably some classpath settings or I need to import something else also in JSP or something I am missing , which I am not able to figure it out.
     So it will be a gr8 help, if u can share some idea about the root of this error. Pls do ask me , if u need further info ...
  4. problem executing a portlet JSP[ Go to top ]

    I am afraid I don't know enough about IBM's portlet implementation to give you more specific advice. My best guess is the one I gave you above: that it is related to missing or mispelled configuration data.

    I suggest you re-ask the question on one of IBM's help forums.