On Wed, 09 Oct 2002, Will Jaynes wrote:

> It seems to me that the problem is that you are trying to do everything 
> in the JSP without benefit of using an Action. The Action is where this 
> kind of processing should take place. (Some developers would push it 
> further, into Business Objects, but they would still be called from the 
> Action.) In the Action you have access to both the form and your DB bean 
> and can handle interactions between them.
> 
> So, I would make the entry point of your application an Action, not just 
> a JSP.

Will, thanks for your quick response.

Ok, that is a good idea. I will try it. You are right: My way is not the
struts-like way to do it.

But still: Is there no way to get data out of the FormBean? Somewhere in
my JVM this FormBean exists, and somehow I should be able to read data from it.
Or am I wrong?


> Markus Herrmann wrote:
> > Hello Struts users,
> > 
> > i have a JSP whose form data is stored in an ActionForm bean (as it should 
be). 
> > The ActionForm bean sets the form data to default values (e.g. it gets 
todays 
> > date). The JSP not only displays the form, but also displays data which 
comes 
> > from a DB bean. In the JSP I use the <jsp:useBean> tag to associate the DB 
bean 
> > with the JSP. The DB Bean connects to a DB and writes the data into a 
Vector, 
> > which is displayed by the JSP using the <logic:iterate> and <bean:write> 
tags. 
> > No problems until now.
> > 
> > Now i would like to select the data in the DB bean depending on two 
propertys 
> > in the ActionForm Bean. How can my DB bean read propertys from the 
ActionForm 
> > bean?
> > 
> > Note that until this point no user intaraction happens. This JSP is the 
entry 
> > point of the application. I decided not to post the whole code here, 
because i 
> > do not think that this helps to understand and answer my question. Correct 
me 
> > if i'm wrong.
> > 
> > Thanks for any help in advance!
> > 
> > Markus Herrmann, Germany
> > 
> > 
> > --
> > To unsubscribe, e-mail:   <mailto:struts-user-
[EMAIL PROTECTED]>
> > For additional commands, e-mail: <mailto:struts-user-
[EMAIL PROTECTED]>

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

Reply via email to