Keith, I don't use bean:define, but it works in most cases. Instead, I create the bean in my action class. That means you will have to specify the .do or /do/... url whenever you have a link to your page. The Action will run before you ever hit your JSP so you create the bean in the Action and use the request passed into your Action to set the action in the proper scope. You do not have to define the bean in struts config.
The values entered on the form will be placed in the bean specified on the html:form tag. If that is a struts form, you will end up with two copies of your bean (it can be convenient because then you have from and to values), one on the form and one associated with your action class. The name you specify on your html:text(?) tag would be the name you assign to the attribute you saved in the action class. David Morris >>> [EMAIL PROTECTED] 06/20/02 10:36AM >>> Hey, I posted this a while ago, and go no response at all. Sorry if I'm a pain in the ass, but does nobody know how to do this? It doesn't seem like it should be too complex for anyone that has much experience with struts. Please help! -----Original Message----- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 10:23 AM To: Struts (E-mail) Subject: Bean Usage - Collections Hi everyone, I'm new to struts and right now I'm working on some collections in my app. I have an EntryHolder bean class that has 3 properties (ArrayLists of entries) which each hold a different type of entry. Each type of entry is it's own class. I then have a form that fills in the info into the entry class. I believe I can just use the <bean:define id="entries" name="beanName" type="com.moog.us.beans.EntryHolder"/> tag (before the link to my form page) to instantiate the EntryHolder bean, right? (Do i need to define this bean in struts-config, if the input doesn't come from a form?) In order to the put the entry into the corresponding ArrayList, do I add it to the list in my Action that handles the form? If so, how do I access that bean in the action? My only guess is that I get it from the "request" parameter, or the HttpSession . Any input would be greatly appreciated. Thanks! Keith Kamholz -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>