struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Felaco <cfel...@concero.com>
Subject Problem with editSubscription page in example
Date Fri, 30 Jun 2000 14:12:01 GMT

Hi,

I'm trying out struts on NT 4 with PWS and JRun 3.0.  First off, the
JRun admin tool handily deployed the docs and demo applications simply
by specifying the .war file.  Nice.

But I did have one problem with the example application.  In the
subscription.jsp page I would get the following exception:

500 Internal Server Error

/struts-portal/editSubscription.do:

javax.servlet.ServletException: <jsp:getProperty> on line '43' failed.
java.lang.IllegalArgumentException: Bean was null
        at
allaire.jrun.jsp.JRunJSPStaticHelpers.getBeanProperty(JRunJSPStaticHelpers.java:289)

        at
jrun__subscription2ejsp11._jspService(jrun__subscription2ejsp11.java,
Compiled Code)
        at allaire.jrun.jsp.HttpJSPServlet.service(HttpJSPServlet.java,
Compiled Code)
        at allaire.jrun.servlet.JRunSE.service(JRunSE.java, Compiled
Code)
        at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java, Compiled
Code)
        at
allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java,
Compiled Code)
        at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java, Compiled
Code)
        at allaire.jrun.servlet.JRunSE.service(JRunSE.java, Compiled
Code)
        at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java, Compiled
Code)
        at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java,
Compiled Code)
        at
org.apache.struts.action.ActionServlet.processActionInstance(ActionServlet.java,
Compiled Code)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java,
Compiled Code)
        at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:291)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
        at allaire.jrun.servlet.JRunSE.service(JRunSE.java, Compiled
Code)
        at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java, Compiled
Code)
        at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java,
Compiled Code)
        at allaire.jrun.servlet.JRunSE.service(JRunSE.java, Compiled
Code)
        at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java,
Compiled Code)
        at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java,
Compiled Code)
        at allaire.jrun.ThreadPool.run(ThreadPool.java, Compiled Code)
        at allaire.jrun.WorkerThread.run(WorkerThread.java, Compiled
Code)

I can see that in the EditSubscriptionAction, the user bean is added to
the session object under the attribute "user", but the <jsp:getProperty>
tag fails to find the bean.  To fix the problem, I had to add a useBean
tag:

    <jsp:useBean id="user" class="org.apache.struts.example.User"
scope="session"/>

Does this work out of the box with Tomcat?  My understanding was that
useBean would put the bean in the appropriate attribute table for the
scope, and also assign it to a servlet instance variable of the same
name so it could be used in the page.  The getProperty tag would then
just use the local variable.  I suppose that's a naive implementation,
and getProperty should check each scope for the bean.  So is this a bug
in the example, JRun, stuts, or the jsp containers where it works?

Thanks,

- Chris



Mime
View raw message