You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chris Felaco <cf...@concero.com> on 2000/06/30 16:12:01 UTC

Problem with editSubscription page in example

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



Re: Problem with editSubscription page in example

Posted by Klaus Thiele <kt...@pi-ag.com>.
Am Fre, 30 Jun 2000 schrieben Sie:

> 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

i get the same error with orion, tomcat works.

klaus

--
Klaus Thiele - Personal & Informatik AG
mailto:kth@pi-ag.com

 "There's got to be more to life than compile-and-go."