File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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: 60975
    
  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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP and Database tables