Hi All,

I am trying to get Struts up and running inside of a version 5.1 weblogic
container.  It seems that I am close, because some of the tags work (like
the link tag).  However, any tag that depends on the presence of a resource
bundle (such as the message tag) fails with the following stack trace:

Wed Nov 29 10:54:07 PST 2000:<E> <ServletContext-struts-example> Servlet
failed
with Exception
javax.servlet.ServletException: runtime failure in custom tag 'message'
        at jsp_servlet._index._jspService(_index.java:89)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:105)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:123)
        at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:742)
        at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:686)
        at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:247)
        at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:361)
        at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)

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

Wed Nov 29 10:54:08 PST 2000:<E> <ServletContext-struts-example> root cause
of ServletException
java.lang.NullPointerException:
        at
weblogic.servlet.jsp.PageContextImpl.getAttribute(PageContextImpl.java:156)
        at
org.apache.struts.taglib.MessageTag.doStartTag(MessageTag.java:358)
        at jsp_servlet._index._jspService(_index.java:81)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:105)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:123)
        at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:742)
        at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:686)
        at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:247)
        at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:361)
        at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)

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

I looked at the source code for MessageTag.java and it fails at the point
where it is trying to get a "bundle" object (instance of MessageResources)
out of the PageContext application scope.  


        // Acquire the resources object containing our messages
        MessageResources resources = (MessageResources)
            pageContext.getAttribute(bundle, PageContext.APPLICATION_SCOPE);


If I'm not mistaken, the MessageResources object should contain name/value
pairs from ApplicationResources.properties.  I have that file in its default
location
(/WEB-INF/classes/org/apache/struts/example/ApplicationResources.properties)
.  I have not seen any FileNotFoundException's so I think it is finding it
OK.  However, the MessageResources object is either not getting created, or
is not making it into the application scope.  Is there something I need to
configure in weblogic.properties to insure that the application is
initializing properly?

By the way, this is the "struts-example" application that came with the
struts binary distribution.  It works fine under my tomcat installation but
we use weblogic in production.

Any suggestions would be helpful.

Thanks,
Jeff

PS  does anyone know if there are any other lists/websites that may have
searchable FAQ's about struts?

Reply via email to