On Wed, 22 Jul 2003, David M. Karr wrote:
> I've been working on some minor updates to Struts-EL, to match recent changes
> to the base tag library, so I've been running through some tests.  I'm using
> WebLogic 8.1 for these tests.
>
> I first noticed that the strutsel-exercise-taglib application dies with the
> following stack trace:
> -----------------
> java.lang.NullPointerException
>         at org.apache.struts.util.RequestUtils.pageURL(RequestUtils.java:1591)
>         at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:536)
>         at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:431)
>         at org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:495)
>         at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:353)
>         at org.apache.strutsel.taglib.html.ELLinkTag.doStartTag(ELLinkTag.java:675)
> -----------------
>
> Line 1591 is the following (after I added a couple of debugging lines):
>
>         String pagePattern = moduleConfig.getControllerConfig().getPagePattern();
>
> I found that "moduleConfig" is null here, but I don't know why.
>
> Before I submit a bug for this, does anyone have an idea what might be
> happening here?
>

  This is most likely the bug I wrote about a couple days ago at
http://www.mail-archive.com/struts-dev%40jakarta.apache.org/msg16878.html

The moduleConfig was never stored in the request scope because
RequestUtils.selectModule() was never called by the actionservlet.  This
is because the page was not accessed through the ActionServlet (e.g. via
an action mapping), it is accessed directly from the view (jsp page).
selectModule sets the the module/subapp configuration instance and default
message resource in the request scope, and actionservlet calls it when
being processed.

I will post this as a bug since my original email didnt get any responses.
It encompasses any taglib that accesses a method (most likely a
RequestUtil method) that needs to access the module config instance or
default message resource in the request scope.

-Adam K.

--

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to