Bookmark Topic Watch Topic
  • New Topic

which is better sql:query or DAO class

 
Kaleeswaran Karuppusamy
Ranch Hand
Posts: 155
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
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]
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
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)
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic