Hi I m student and I start learning jsp .Their is both jsp tag library and jsp scripting is available which one should I use to develop application?
what should i do in jsp
Collapse
X
-
Your question is not really straight forward. JSP scripting (when used) refers to any code written inside JSPs which includes using tag libraries.
What to use for your application depends on what the application does. I would suggest not using tag libraries too much. But that's not based on your application needs. -
Here's a more blunt advice: don't do anything in your JSP code that belongs in the Controller or Model part of your MVC (Model View Controller) application. JSPs live in the web-tier and they should deal with the View part of the application.
No matter any availability of tags in your JSTL (e.g. the 'sql' tag). You entangle your tiers in one big knot in one tier again which you certainly don't want although you don't know it now.
Leave that business logic to your POJOs (Plain Old Java Objects) that are directed (partly) by a Controller implemented by your Servlet or delegates thereof. Your JSPs should generate a fancy look on the client tier; no more no less.
kind regards,
JosComment
Comment