struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Etienne Labonté <elabo...@baan.com>
Subject Iterate through resultset
Date Thu, 21 Nov 2002 20:27:49 GMT
Hi,

I'm working on this application where I get resultsets in jsp pages from
business objects. The dbtags taglib is of no use here since the bo's handle
the sql connections and statements. And the struts logic taglib will only
iterate through collections. So I procede like this:

            <jsp:useBean id="bo" scope="session"
class="com.mycompany.bo.Forecasts"/>
    
            <%
              ResultSet rs = bo.getForecasts();
              
              while(rs.next()) {
            %>

            ... display forecasts ...

The business objects are created and their properties are set by struts
actions. Properties (such as starting and ending dates) are taken from
DynaActionForms.

Does this look like good practice? Thanks


Etienne

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message