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

0

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.

Share.

About Author

Lucas Jellema, active in IT (and with Oracle) since 1994. Oracle ACE Director for Fusion Middleware. Consultant, trainer and instructor on diverse areas including Oracle Database (SQL & PLSQL), Service Oriented Architecture, BPM, ADF, Java in various shapes and forms and many other things. Author of the Oracle Press book: Oracle SOA Suite 11g Handbook. Frequent presenter on conferences such as JavaOne, Oracle OpenWorld, ODTUG Kaleidoscope, Devoxx and OBUG. Presenter for Oracle University Celebrity specials.

Comments are closed.