• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need help in transfering data from JDBC layer to Presentation Layer [JSP]

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

In Model2 Architecture i use <%=rs.getString(1)%> to populate the resultset objects in JSP.

When you use multi-tiered application, how to transfer a large set of data from DAO layer to Presentation Layer? I tried to use ArrayList but i wonder why i am not getting idea of how to take it to JSP layer.

Kindly explain any tutorials for it or what are the available methodologies to present it in JSP.

I am grateful for everyone can guide me in achieving a solution for this.


Thank you very much.

Sakthi.
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

<%=rs.getString(1)%> to populate the resultset objects in JSP.



Here you are not populating a "resultset" object, it looks like you are retrieving data "from" a "resultset" object that has been already populated. Either way, it is a poor design if you are calling any methods of a JDBC object from within JSP scriptlet code, e.g. ResultSet

An ArrayList is a good choice for getting data to the Presentation tier from the Business tier. Check out the useBean tag of the standard JSP tag library and also check out the iterate tag of the Struts tag library.

reply
    Bookmark Topic Watch Topic
  • New Topic