Chapter 8: JavaServer Pages

 < Free Open Study > 


Although servlets are powerful web components, they are not the ideal technology available to us to build presentation elements. This is because:

  • Amending the look and feel of the system involves recompiling the servlet classes

  • The presence of HTML within the servlets tightly couples the presentation and the content, which blurs the roles of presenting and providing content

  • Lots of HTML code within the servlet classes make them difficult to maintain

JavaServer Pages (JSP) addresses these concerns. JSP pages are text files similar to HTML files but have extra tags that allow us to:

  • Interact with dynamic content

  • Include content from other web application resources

  • Forward the response to other web application resources

  • Perform custom processing on the server when the page is served by the web container

In this chapter we will look at:

  • How JSP pages are processed by the web container

  • JSP declarations, scriptlets, and expressions

  • JSP directives

  • JSP standard actions

  • JSP custom actions

We'll round off the chapter by looking at an example in which we'll construct an application that demonstrates how we can use servlets and JSP pages in tandem.

 < Free Open Study > 

Professional Java Servlets 2.3
Professional Java Servlets 2.3
ISBN: 186100561X
EAN: 2147483647
Year: 2006
Pages: 130 © 2008-2017.
If you may any questions please contact us: