Hi Jose,

You need a "scope" attribute in the <action> tag for your RelocationAction,
to tell Struts in what context the associated form bean gets placed (legal
values are request, session, and application).  Seems to me that Struts
should complain about the struts-config file if this is missing and there's
an associated form bean, but whatever.  That's why it says "..in scope
null".  There's no value for the scope, so it can't find the bean, and it
just prints out "null".

Try this:

..........................

<action path="/logon"
               type="com.walmart.telecomorder.formbeans.RelocationAction"
               name="logonForm"
               input="/f_Relocation.jsp"
                   scope="request" >

............................

more info:
http://jakarta.apache.org/struts/doc-1.0.2/userGuide/building_model.html#jav
abeans


happy coding,

Joe Barefoot

-----Original Message-----
From: Jose Casas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 8:11 AM
To: 'Struts Users Mailing List'
Subject: RE: error


Jim,

I tried changing the name to the one in the struts-config file and it gave
me this error   Cannot find bean logonForm in scope null

<bean:define id="somebean" name="logonForm" property="SelectBox1List"
type="java.util.ArrayList"/>

Here's my struts-config file

<struts-config>

    <form-beans>
          <form-bean name="logonForm"

type="com.walmart.telecomorder.formbeans.RelocationForm" />
    </form-beans>

    <action-mappings>
        <action path="/logon"
               type="com.walmart.telecomorder.formbeans.RelocationAction"
               name="logonForm"
               input="/f_Relocation.jsp">


                  <forward name="success" path="/success.jsp" />

                  <forward name="failure" path="/failure.jsp" />


        </action>
    </action-mappings>
</struts-config>

what did i do wrong?

Thanks for your help.

Jose Casas

E-Commerce Applications
(501) 277-3112
[EMAIL PROTECTED]



> -----Original Message-----
> From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, March 28, 2002 10:02 AM
> To:   Struts Users Mailing List
> Subject:      Re: error
>
> Hi Jose.
>
> The "name" property should refer to an actual name, not a class.  The
> name you should use will be the one referred to in the "name"
> attribute specified in the corresponding action tag in
> struts-config.xml.
>
> -- Jim
>
> Jose Casas <[EMAIL PROTECTED]> writes:
>
> > Does anybody know what this error means.
> >
> > Cannot find bean com.walmart.telecomorder.formbeans.RelocationForm in
> scope
> > null
> >
> > THe following line seems to be causing this error.  When i take it out
> of my
> > jsp, the jsp works fine.
> >
> > <bean:define id="somebean"
> > name="com.walmart.telecomorder.formbeans.RelocationForm"
> > property="SelectBox1List" type="java.util.ArrayList"/>
> >
> > Thanks.
> >
> > Jose Casas
> >
> > E-Commerce Applications
> > (501) 277-3112
> > [EMAIL PROTECTED]
> >
> >
> >
> > **********************************************************************
> > This email and any files transmitted with it are confidential
> > and intended solely for the individual or entity to
> > whom they are addressed.  If you have received this email
> > in error destroy it immediately.
> > **********************************************************************
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>

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


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

Reply via email to