You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Wong Kok Wai <wo...@pacific.net.sg> on 2000/07/03 08:06:26 UTC

0702 build and Weblogic 5.1

Encountered the following exception with the latest build when running
on Weblogic 5.1sp3:

Mon Jul 03 14:03:23 GMT+08:00 2000:<E> <WebAppServletContext-struts>
Root cause
of ServletException
java.lang.NullPointerException:
        at
weblogic.servlet.jsp.PageContextImpl.getAttribute(PageContextImpl.jav
a:159)
        at
org.apache.struts.taglib.MessageTag.doStartTag(MessageTag.java:358)
        at jsp_servlet.index._jspService(index.java:82)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:123)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:141)
        at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
textImpl.java:744)
        at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
textImpl.java:692)
        at
weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
ContextManager.java:251)
        at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
a:363)
        at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)

        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,
Compiled Code)



How to add logic inside an iterator tag

Posted by Robert Edgar <ro...@hkstar.com>.
What I want to do is display two columns of checkboxes.

The data is fed from a vector(sourced from the DB) and I am using the
iterate tag to generate the checkbox tag inside a TD element.

This works to a degree, however I need to somehow add the TR tag every other
"row" from teh vector but I cant see anyway I can access a counter whilst I
am in the iterator body.

Of course I could just forget the tag and code this up using a normal loop
inside a scriptlet without a problem but I thought there must be someway to
do this in tha tag.

Any thoughts?

Rob


Re: 0702 build and Weblogic 5.1

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Wong Kok Wai wrote:

> Encountered the following exception with the latest build when running
> on Weblogic 5.1sp3:
>
> Mon Jul 03 14:03:23 GMT+08:00 2000:<E> <WebAppServletContext-struts>
> Root cause
> of ServletException
> java.lang.NullPointerException:
>         at
> weblogic.servlet.jsp.PageContextImpl.getAttribute(PageContextImpl.jav
> a:159)
>         at
> org.apache.struts.taglib.MessageTag.doStartTag(MessageTag.java:358)
>

Lines 357-358 of MessageTag say this:

    MessageResources resources = (MessageResources)
      pageContext.getAttribute(bundle, PageContext.APPLICATION_SCOPE);

which cannot throw a null pointer exception itself.  This sounds like a
bug in Weblogic's "weblogic.servlet.jsp.PageContextImpl" class (at line
159).  It sounds like you might be able to use Struts as a test case in a
bug report to BEA.

Craig McClanahan