Populating a drop down from the Database

Hi all,

I am very new to Struts.Please help me to solve the problem listed below.

I have an ArrayList named "qtechnology" in the ActionForm class .I need to populate a drop down named "qtechnology" in the JSP page from this ArrayList which is loaded from the database with some String objects(not beans).In the Action class I have set a request named"qtech" with this ArrayList.I tried out some code from "Struts in Action(Page NO : 296)".But that did not succeed.Please help me.

Thanks & Regards

Neelambary

[542 byte] By [Neelambarya] at [2007-10-3 4:56:06]
# 1
Do you really need help finding a struts book or tutorial? I think Google can help.
SoulTech2012a at 2007-7-14 23:01:18 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

Well, this looks more like a "Struts" question than a "Java" question, nevertheless there is more than one way to solve your problem (with struts and Java). You can use the HTML tags that comes with struts. You can read in the Struts documentation how to use them. There are plenty of helpful tags for you to use (see http://struts.apache.org/1.2.7/userGuide/struts-html.html). In your case, i"m guessing that the <html:options> will be your friend. Alternatively, if you are having your action (or actionForm) connect to the DB for the list of "Strings", I will suggest to write your own tag since that's one of the main reasons why this is available. This, then is a Java question which I'm sure you can find in many places in google (how to write your own JSP tag).

Good luck!

afloresa at 2007-7-14 23:01:18 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...