What is the difference between the JSP and the JSTL? [duplicate]
I have learned about servlets and the JSP's before, but I don't know what is the JSTL and the difference between the JSP and the JSTL.
JSP is a technology similar to ASP that let you embed Java code inside HTML pages. This code can be inserted by means of <% %> blocks or by means of JSP tags. The last option is generally preferred over the first one, since tags adapt better to own tag representation form of HTML, so your pages will look more readable. JSP lets you even define your own tags (you must write the code that actually implement the logic of those tags in Java). JSTL is just a standard tag library provided by Sun (well, now Oracle) to carry out common tasks (such as looping, formatting, etc.).
精彩评论