This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes JSTL sql:query tag 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
Bookmark "JSTL sql:query tag" Watch "JSTL sql:query tag" New topic
Author

JSTL sql:query tag

C Vivek
Ranch Hand

Joined: Oct 03, 2004
Posts: 115
Hi Guys

If I use sql tags in my JSP, am I adhering to MVC design pattern? Shouldnt these tags be deprecated?

Thanks
Vivek
[ July 04, 2007: Message edited by: C Vivek ]
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

They sure smell bad, but I'm not sure there's a way to indicate that a tag is deprecated anyway. If you use a deprecated java class, you'll be warned, but for a tag, somebody is going to tell you "hey, why are you using that old crap?" ;) I think you are right to say that they should be avoided, but I don't think there's any effective way to prevent their use.


[My Blog]
All roads lead to JavaRanch
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by C Vivek:
Hi Guys

If I use sql tags in my JSP, am I adhering to MVC design pattern? Shouldnt these tags be deprecated?

Thanks
Vivek

[ July 04, 2007: Message edited by: C Vivek ]


No, and Yes respectively.


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: 60741
    
  65

Even the JSTL Spec itself says not to use them for anything "real". Makes you wonder why they were concocted in the first place.

They should be avoided like a mouth-foaming junkyard dog.

P.S. Good job in recognizing that these tags don't fit modern best practices and raising your question! :thumb:
[ July 04, 2007: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
Consider Paul's rocket mass heater.
 
subject: JSTL sql:query tag
 
Similar Threads
Few tips
Need help in XML & XSL
response.addHeader question.
Marcus
How to set JSESSIONID's maxAge?