Class 2 |
Intermediate Java 30-IT-397 |
|
JSP Expressions
-
Place the result of Java statements directly into the HTML.
-
Example: <%= "Good Morning!" %> prints Good Morning!
to the HTML.
-
Note: no need for out.println() here. It just prints what it sees.
-
This executes at runtime, so the results are dynamic.
Predefined Variables
-
Predefined variables make expressions simpler.
-
request is the HttpServetRequest object.
-
response is the HttpServletResponse object.
-
session is the HttpSession associated with the request.
-
out is a stream used for writing to the HTML output. Similar
to System.out.println() in an application.
Example

Created by: Brandan Jones
December 17, 2001