tags:

views:

59

answers:

2

Hi, everyone,

I want to ask a question about the web programming. I learn the servlet and the JSP before, but I don't know what is the JSTL and the different between the JSP and the JSTL. Can anyone help me? Thank you.

A: 

Check out

Btw these come up by googling "jstl" as the first and third hit, respectively.

Péter Török
+2  A: 

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.).

Fernando Miguélez
@Frenando Miguelez, thank you for your reply. If I implement the JSTL, is it the same code of the JSP? ( I mean the <jsp:...>) or the .jsp will change to .jstl? thank you.
Questions
You use just plain normal JSPs. The only difference is that you must declare at the beginning of JSP what part (core, sql, etc.) of JSTL you will be using: http://www.java2s.com/Code/Java/JSTL/JSTLImportaPage.htm
Fernando Miguélez