aspose file tools*
The moose likes JSP and the fly likes JSP and Database tables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP and Database tables" Watch "JSP and Database tables" New topic

JSP and Database tables

Christophe Verré

Joined: Nov 24, 2005
Posts: 14687

Suppose I have the following requirements (basically, editing DB data from JSP):
1. To display the content of a database table in a JSP page
2. A table may contain lots of record, so pagination should be possible
3. Allow the user to modify the content of the table (update, delete)

What would you recommend to do this ?

I'm considering using the DisplayTag to show the content.
In the library's help, they show two solutions to retrieve data:
1. Using JSTL's sql tags
2. Using dynabeans

Thank you

[My Blog]
All roads lead to JavaRanch
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

I would vote against JSTL SQL tags.
They (in my opinion) go against the principals of MVC and never should have been written.

The spec itself recommends that they only be used in trivial apps.

I don't know much about dynaBeans so I can't comment there.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60048

Originally posted by Ben Souther:
I would vote against JSTL SQL tags.

Second the motion.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Christophe Verré

Joined: Nov 24, 2005
Posts: 14687

Thank you very much for sharing.
abhishek gowlikar

Joined: Aug 17, 2006
Posts: 13
I think Databeans are Much Gud then the JSTL As per my Real time Experience
I agree. Here's the link:
subject: JSP and Database tables
Similar Threads
JSP and Flash Communication
JSP and Flash communication
dynamic pagging
Dates help
org.hibernate.exception.GenericJDBCException: could not execute query