Rishi,

It depends how complicated you application is.  If it is pretty complex,
then you should have other beans that access the database instead of writing
the code into the action.

I used a database bean to retrieve information and display it on a JSP.  

i.e.
<jsp:useBean id="bob" scope="request" class="org.bob.database"/>
and then,
<bean:write name="bob" property="id" />
to get information out of the bean.

Do a search for 'html : select' on this mailing list and you should see a
few articles on how to do this with the select feature.

Regards,

Princeton

-----Original Message-----
From: Rishi Bhardwaj [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 8:20 AM
To: '[EMAIL PROTECTED]'
Subject: populating a list box


 HI,

  i want to populate  list box ( using html:select and options tag in
struts) on the first page itself..
  where should i write my methods for calling database related issues..

 if the answer is that i should write it in action bean then a question
arises that action is only called after the form is submitted...
 if anyone has a code for doing this please mail it 

  thanks
 rishi




Reply via email to