Thanks, I'll try this.

Jose Casas

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



> -----Original Message-----
> From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, March 28, 2002 2:14 PM
> To:   Struts Users Mailing List
> Subject:      Re: error
> 
> Jose Casas <[EMAIL PROTECTED]> writes:
> 
> > So you're saying that when I post the form, the logonForm bean is not
> used
> > at all.  
> 
> Not quite.  The problem occurs when you *retrieve* the form, not when
> you *post* it.
> 
> Assuming that the scope attribute of your action is "session", try
> this little test.  Take the <bean:define> out of your page, access it
> directly, and post your form.  The post will cause the ActionServlet
> to put the formbean in session scope.
> 
> Now, without shutting your app server down -- we're assuming that the
> app server recompiles jsp's on the fly if they change -- put the
> <bean:define> back in the page, and access it directly.  Because the
> formbean is in the session, the <bean:define> tag should not complain
> this time.
> 
> The bottom line is that you need an Action (possibly the same one)
> that not only handles the posting of the form, but the initial
> creation of the form.  Or at least whatever beans your view requires.
> 
> -- Jim
> 
> > All my values are being set by something...I don't understand what
> > you're trying to say when you say that the <bean:define> is the only
> thing
> > that is expecting the logonForm bean to be there.
> > 
> > Thanks.
> > 
> > Jose Casas
> > 
> > E-Commerce Applications
> > (501) 277-3112
> > [EMAIL PROTECTED]
> > 
> > 
> > 
> > > -----Original Message-----
> > > From:     Jim Crossley [SMTP:[EMAIL PROTECTED]]
> > > Sent:     Thursday, March 28, 2002 1:40 PM
> > > To:       Struts Users Mailing List
> > > Subject:  Re: error
> > > 
> > > Jose Casas <[EMAIL PROTECTED]> writes:
> > > 
> > > > I know how all that works.  The only thing that's giving me problems
> is
> > > the
> > > > <bean:define> declaration.
> > > 
> > > The eternal paradox, eh?  To be all-knowing and still have problems...
> > > 
> > > The <bean:define> expects there to be a bean named logonForm in scope.
> > > Something has to put it there, right?  The ActionServlet will put it
> > > there if you let it, but accessing the page directly bypasses the
> > > ActionServlet. 
> > > 
> > > > As soon as I take it out my jsp (accessing directly!!!) works.
> > > 
> > > That's because you took out the only thing that expected the logonForm
> > > bean to be around.
> > > 
> > > Maybe someone else on the list can clarify better than I can, but
> > > everything I'm saying is already said well-enough in the user guide,
> > > IMHO.
> > > 
> > > > Thanks for trying.
> > > > 
> > > > Jose Casas
> > > > 
> > > > E-Commerce Applications
> > > > (501) 277-3112
> > > > [EMAIL PROTECTED]
> > > > 
> > > > 
> > > > 
> > > > > -----Original Message-----
> > > > > From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
> > > > > Sent: Thursday, March 28, 2002 1:20 PM
> > > > > To:   Struts Users Mailing List
> > > > > Subject:      Re: error
> > > > > 
> > > > > You probably need to set aside an hour and take a gander at the
> user
> > > > > guide:
> http://jakarta.apache.org/struts/doc-1.0.2/userGuide/index.html
> > > > > 
> > > > > You need to understand why you put these lines in your web.xml
> file:
> > > > > <servlet-mapping>
> > > > >   <servlet-name>action</servlet-name>
> > > > >   <url-pattern>*.do</url-pattern>
> > > > > </servlet-mapping>
> > > > > 
> > > > > In an MVC application, all requests go through a controller.
> Struts
> > > > > utilizes the <url-pattern> as the way to direct requests to its
> > > > > controller, ActionServlet.  That means you invoke your actions by
> > > > > appending '.do' to your action paths, like so:
> > > > > 
> > > > >   http://yourhost/yourapp/logon.do
> > > > > 
> > > > > Good luck.
> > > > > 
> > > > > -- Jim
> > > > > 
> > > > > Jose Casas <[EMAIL PROTECTED]> writes:
> > > > > 
> > > > > > What do you mean by invoking the ActionServlet?  I put it in the
> > > web.xml
> > > > > and
> > > > > > my <html:form> action looks like this 
> > > > > >        <html:form action="logon.do">
> > > > > > 
> > > > > > Also, what do you mean when you say that trying to pull up the
> JSP
> > > in
> > > > > the
> > > > > > browser directly won't work?  How am I supposed to do it?  Is
> there
> > > a
> > > > > right
> > > > > > way to do it?
> > > > > > 
> > > > > > Thanks for helping me out.  
> > > > > > 
> > > > > > 
> > > > > > this is my web.xml
> > > > > > 
> > > > > > <web-app>
> > > > > > <servlet>
> > > > > >     
> > > > > >     <servlet-name>action</servlet-name>
> > > > > >     
> > > > > >
> > > <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
> > > > > >     <init-param>
> > > > > >              <param-name>application</param-name>
> > > > > >  
> > > > > >
> > > > >
> > >
> <param-value>com.walmart.telecomorder.formbeans.ApplicationResources</para
> > > > > m-
> > > > > > value>
> > > > > >          </init-param>
> > > > > >     <init-param>
> > > > > >             <param-name>config</param-name>
> > > > > >
> > > <param-value>/WEB-INF/struts-config.xml</param-value>
> > > > > >     </init-param>
> > > > > >     <init-param>
> > > > > >             <param-name>validate</param-name>
> > > > > >             <param-value>true</param-value>
> > > > > >     </init-param>
> > > > > >     
> > > > > >     <load-on-startup>1</load-on-startup>
> > > > > > </servlet>
> > > > > > 
> > > > > > <servlet-mapping>
> > > > > >     
> > > > > >     <servlet-name>action</servlet-name>
> > > > > >     <url-pattern>*.do</url-pattern>
> > > > > >     </servlet-mapping>
> > > > > > 
> > > > > >     <welcome-file-list>
> > > > > >             
> > > > > >             <welcome-file>logon.jsp</welcome-file>
> > > > > >     </welcome-file-list>
> > > > > > 
> > > > > >     <taglib>
> > > > > >             
> > > > > >             <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
> > > > > >
> > > <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
> > > > > >     </taglib>
> > > > > >     
> > > > > >     <taglib>
> > > > > >             
> > > > > >             <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
> > > > > >
> > > <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
> > > > > >     </taglib>
> > > > > >     
> > > > > > </web-app>
> > > > > > 
> > > > > > Jose Casas
> > > > > > 
> > > > > > E-Commerce Applications
> > > > > > (501) 277-3112
> > > > > > [EMAIL PROTECTED]
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From:     Jim Crossley [SMTP:[EMAIL PROTECTED]]
> > > > > > > Sent:     Thursday, March 28, 2002 12:43 PM
> > > > > > > To:       Struts Users Mailing List
> > > > > > > Subject:  Re: error
> > > > > > > 
> > > > > > > What you have looks correct to me, Jose.  What are you trying
> to
> > > pull
> > > > > > > up in the browser: the JSP or the Action?  The error you're
> > > getting
> > > > > > > makes me think you're not invoking the ActionServlet (the C in
> > > MVC) so
> > > > > > > it's not instantiating your formbean (the M in MVC) and making
> it
> > > > > > > available to the JSP (the V in MVC).  Are you trying to pull
> up
> > > the
> > > > > > > JSP in the browser directly?  That won't work.
> > > > > > > 
> > > > > > > -- Jim
> > > > > > > 
> > > > > > > Jose Casas <[EMAIL PROTECTED]> writes:
> > > > > > > 
> > > > > > > > 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]>
> > > > > > 
> > > > > > --
> > > > > > 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]>
> > 
> > --
> > 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