I guess that's where I get lost. What does the bean return so that it
can display multiple rows in the JSTL/JSP? I guess the type of the
'getter' would be some type that allowed you to loop through the
data....an array maybe?

Do you know if there are any examples on the web? I'm trying to stick to
just JSP/JSTL/Servlets/Java and trying to steer away from additional
tools like Hibernate.

Thank you much!


-----Original Message-----
From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 02, 2004 2:02 PM
To: 'Struts Users Mailing List'
Subject: RE: Struts and Displaying data from a database

> I'm a complete newbie to Struts. I know how to use Struts to 
> build forms and submit them, but how do I just display data 
> from a database? I want a screen that just displays data from 
> a sql command to a database and displays the results in a 
> html table. Do I use ActionForm even though I don't have a 
> form? I haven't been able to find any good examples on the web.

You don't necessarily need an ActionForm for this, but you do need a
JavaBean to hold the data you want to display. To display it on the
page,
use JSTL <c:out ...> tags.

--
Tim Slattery
[EMAIL PROTECTED]


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

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

Reply via email to