Two Laptop Bag
The moose likes JSP and the fly likes which is better sql:query or DAO class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » JSP
Reply locked New topic

which is better sql:query or DAO class

Kaleeswaran Karuppusamy
Ranch Hand

Joined: Jul 19, 2007
Posts: 155
1.In Struts framework we are using datasource(connection pooling)
we stored and retrieved value from database using DAO class.

2.But in JSTL core having <sql:query>,<sql atasource> ect.

but i am working in struts framework we are using DAO class.

which is better to use either DAO class or jstl tag in jsp,please tell me the reason?

Judge a man by his questions rather than his answers --Voltaire
SCJP 1.5 97%
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

Avoid using JSTL's sql tags. Database processing does not belong to JSP views. You should keep things clean, and access the database from an appropriate class (like a DAO)

[My Blog]
All roads lead to JavaRanch
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Duplicate of:

kalees waran,
Please don't ask the same question in multiple forums.
Doing so is called cross-posting. It causes duplication of effort and is a waste of people's time.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: which is better sql:query or DAO class
It's not a secret anymore!