*
The moose likes Struts and the fly likes Iterate tag HELP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Iterate tag HELP" Watch "Iterate tag HELP" New topic
Author

Iterate tag HELP

Matthew Vincent
Greenhorn

Joined: May 01, 2003
Posts: 8
What is the best architecture to query a database, get the results, and display to the user?
I do not need help with the paging logic.
I have a view (JSP page) that an end user types a query into a textarea. Let's call it query.jsp. This submits the query to an ActionForm (QueryForm.java) which validates the data. This is then "forwarded" on by the Struts framework to the Action class (QueryAction.java). Currently, the QueryAction class calls another class from which it gets an ArrayList of Strings which contains the names of the columns. The "data" is also retrieved from this class as a 2 dimensional ArrayList. I have no problems of iterating over the columns using the following:

However, I am having problems iterating over the "rows". Is this the best solution? What other solutions are there? Does anyone have a working example of this? I am getting confused of where the beans should be and how I should be accessing them.
I saw the posting here http://jguru.com/faq/view.jsp?EID=993534, but I wasn't sure of how to set things up (strut-config.xml, etc.) Thanks for any help you can provide.
Matt
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

I think you might have more success in the Struts forum with this one. I'll move it.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Iterate tag HELP
 
Similar Threads
Struts, Logic:Iterate & ArrayList of ArrayList of Strings
How to iterate over one List and get a nested property defined in a different List
Iterate tag HELP
How to write checkbox tag ?
How to use logic:iterate tag