Making Decisions, Decisions- article on JSP, JSTL, arrays of parameters


Just published on the DevShed, an article – excerpt from “Beginning JSP 2 – From Novice to Professional” published by Apress (2004) – on using JSTL for implementing conditional logic an accessing collections.
Making Decisions, Decisions. I found especially the JSTL examples quite useful.

The kinds of program flow control you’ll meet in this article are as follows:

  • Conditional statements: Evaluating a condition in the program and executing code depending on whether the condition evaluates to “trueâ€? or “falseâ€?
  • Iterative statements: Repeating (looping through) sections of code
  • Branching statements: Transferring execution of the program to a particular section of the code

This chapter discusses the syntax Java provides for all of these and also presents the flow control constructs of the Java Standard Tag Library (JSTL). You’ll also look at how Java lets you store and manipulate groups of variables of the same type using arrays. In short, the chapter covers the following:

* How to use arrays and when to use them

* How to compare values

* How to easily incorporate logic in your code

* The if,if…else, and switch statements

* The while,do…while, and for loops
* The break, continue, and return statements

In each case you’ll learn about the standard Java techniques, followed by a JSTL example if appropriate.

About Author

Lucas Jellema, active in IT (and with Oracle) since 1994. Oracle ACE Director and Oracle Developer Champion. Solution architect and developer on diverse areas including SQL, JavaScript, Docker, Machine Learning, Java, SOA and microservices, events in various shapes and forms and many other things. Author of the Oracle Press books: Oracle SOA Suite 11g Handbook and Oracle SOA Suite 12c Handbook. Frequent presenter on community events and conferences such as JavaOne, Oracle Code and Oracle OpenWorld.

Comments are closed.