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

Lucas Jellema

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.

Next Post

Old undocumented stuff - Recompiling with timestamp.

Yesterday i was reading nice discussions on Asktom about the dual table. Afterwards somehow a "undocumented" Oracle feature popped into my mind again. Last time I used is at least in those days I worked with Oracle 7.0 /7.1. So I tried It out on Oracle database version and it still works ;-)