13.07.2015 Views

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

19.3 How to Write a JSP <str<strong>on</strong>g>Applicati<strong>on</strong></str<strong>on</strong>g>431Figure 19.1 Viewing the c<strong>on</strong>verted JSP in NetBeansThe point here is that a request object and a resp<strong>on</strong>se object are definedby the way the servlet is generated. They are called, oddly enough, requestand resp<strong>on</strong>se. In additi<strong>on</strong> to these, a sessi<strong>on</strong> is defined and initialized, justlike we did in our servlet example. (What were we thinking?)There are a few other variables that the c<strong>on</strong>verted servlet has created thatwe can use. We’ll summarize them in Table 19.1. To read more about how touse them, look up the Javadoc page for their class definiti<strong>on</strong>.Remember that these can be used not <strong>on</strong>ly by the expressi<strong>on</strong>s, butalso by the snippets of code.19.3.4 DirectiveThe last of the special delimiters that we will discuss is the <strong>on</strong>e that doesn’t directlyinvolve Java code. The delimiter encompasses a wide varietyof directives to the JSP c<strong>on</strong>verter. We d<strong>on</strong>’t have the space or the patience tocover them all, so we’ll cover the few that you are most likely to need early <strong>on</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!