Week 9 2 JSP Standard Tag Library (JSTL) PDF

Title Week 9 2 JSP Standard Tag Library (JSTL)
Course Enterprise Java Development
Institution Sheridan College
Pages 10
File Size 327.8 KB
File Type PDF
Total Downloads 35
Total Views 132

Summary

Jonathan Penava...


Description

Week 9_2 JSP Standard Tag Library (JSTL)

The JSTL tag library allows you to perform a bunch of logic operations within a JSP, without using scripting tags. While your programming logic should be performed outside of a JSP, you may find that some of these tags are useful for display purposes especially with regards to displaying lists from a database.

Using JSTL In order for us to use the JSTL tag library, we first need to import that library into our JSP. By default, JSTL commands are not read by our JSP files.

The prefix value "c" can be changed to anything, however we usually keep it as c to represent the core library.

By including this tag at the beginning of our JSP, we can now use the JSTL core tag library which includes the following tags:

General-purpose



URL related



Conditional



Iteration

We also need to include the JSTL tag library inside of our web application. To do so make a new folder inside of your "WEB-INF" folder called "lib" and insert the jstl-1.2.jar file. I have uploaded one onto slate for you to download.

tag The tag displays the result of an expression, similar to the way works with a difference that tag lets you use the simpler "." notation to access properties. Attribute

Description

Required

value

Information to output

Yes

default

Fallback information to output

No

Example

JSTL Examples c:out Out using expression tags Some String Value



Action Tag Test

JSTL Examples c:out

Out using expression tags Out using JSTL ...


Similar Free PDFs