This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP and Database tables" Watch "JSP and Database tables" New topic
Author

JSP and Database tables

Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

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
Sheriff

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
Marshal

Joined: Jan 10, 2002
Posts: 60800
    
  65

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é
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Thank you very much for sharing.
abhishek gowlikar
Greenhorn

Joined: Aug 17, 2006
Posts: 13
I think Databeans are Much Gud then the JSTL As per my Real time Experience
 
Don't get me started about those stupid light bulbs.
 
subject: JSP and Database tables
 
Similar Threads
dynamic pagging
org.hibernate.exception.GenericJDBCException: could not execute query
JSP and Flash communication
JSP and Flash Communication
Dates help