permaculture playing cards*
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

which is better sql:query or DAO class

Kaleeswaran Karuppasamy
Ranch Hand

Joined: Jul 19, 2007
Posts: 154
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?
[LIST]


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

Joined: Nov 24, 2005
Posts: 14687
    
  16

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
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Duplicate of:
http://www.coderanch.com/t/364834/Servlets/java/which-one-better-project

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: http://aspose.com/file-tools
 
subject: which is better sql:query or DAO class
 
Similar Threads
which one is better to use in project
Populating one drop down based on the other
Using JSTL in scriplets - compile error
forEach with a resultSet ?
java 1.5 list iteration using jstl tag