Introduction to JSP – 2 Days
Introduction to JSP introduces JavaServer Pages, or JSP, which is the standard means of authoring dynamic content for Web applications under the Java Enterprise platform. The module begins with an introduction of Web applications in general, shows how Java servlets and JSPs establish a framework for writing Web applications, and then covers JSP 2.0 features in detail, from scripting elements to use of dedicated JavaBeans to JSP expressions, and quick introductions of JSTL and custom tag development.
By the end of the module students will be able to create their own JSP applications, including interactive applications using HTML forms and pages that perform fairly complex processing using scripts and or actions. Although scripting is covered, the scriptless authoring style encouraged by the JSP 2.0 specification is emphasized, and students will be well equipped to develop concise and effective JSP applications.
What you will learn
- Explain the fundamentals of HTML and HTTP in the World Wide Web.
- Describe the CGI and its role in implementing interactive Web applications.
- Describe JavaServer Pages and their relationship to servlets and J2EE generally.
- Describe how a JSP is translated into a servlet and processed at runtime.
- Explain the use of directives on JSPs and outline the principal directives.
- Implement simple JSPs that use Java code in declarations, expressions and scriptlets.
- Enumerate and use the implicit objects available to scripting elements.
- Explain the use of HTML forms in Web applications.
- Implement an interactive Web application using JSP.
- Use Java exception handling and JSP error pages to handle errors in JSP applications.
- Implement session management for a JSP application.
- Manage cookies to store client-specific information at various scopes and durations.
- Explain the use of JavaBeans in JSP and their role in enhancing the separation of business logic from page design.
- Use Beans to implement effective interactive JSP applications.
- Describe the use of the JSP expression language in simplifying dynamic page output.
- Write JSP expressions and implement JSPs that use them in favor of scripts.
- Describe the role of the JSP Standard Tag Library in JSP development.
- Implement JSPs that use basic JSTL actions to simplify presentation logic.
- Describe custom tags in JSP and explain how they are implemented, both using Java and JSP itself, and how they are used.
- Discuss threading issues in JSP and describe the use of directives to control how threading is handled.
- Describe the various uses of XML in JSP applications.
- Deploy a logical Web application to a Web server in a WAR file.
Knowledge of HTML and background in Web applications will be helpful but is not strictly necessary. Deep Java experience is not required, but some familiarity with the language is recommended for some of the exercises.
Chapter 1. Web Applications
- The World Wide Web
- Web Servers
- Dynamic Web Pages
- Java Web Technologies
Chapter 2. JSP Architecture
- JSP Containers
- Servlet Architecture
- Page Translation
- Types of JSP Content
- Content Type
- Scripting Elements
- JSP Expressions
- Standard Actions
- Custom Actions and JSTL
- Objects and Scopes
- Implicit Objects
- JSP Lifecycle
Chapter 3. Scripting Elements
- Translation of Template Content
- Dos and Don’ts
- Implicit Objects for Scriptlets
- The request Object
- The response Object
- The out Object
Chapter 4. Interactive JSP Applications
- HTML Forms
- Reading CGI Parameters
- JSPs and Java Classes
- Error Handling
- Session Management
- The Session API
- Cookies and JSP
Chapter 5. Using JavaBeans
- Separating Presentation and Business Logic
- JSP Actions
- Working with Properties
- <jsp:getProperty> and <jsp:setProperty>
- Using Form Parameters with Beans
- Objects and Scopes
- Working with Vectors
Chapter 6. The Expression Language and the JSTL
- Going Scriptless
- The JSP Expression Language
- EL Syntax
- Type Coercion
- Error Handling
- Implicit Objects for EL
- The JSP Standard Tag Library
- Role of JSTL
- The Core Actions
- Using Beans with JSTL
- The Formatting Actions
- Scripts vs. EL/JSTL
Chapter 7. Advanced JSP Features
- Web Components
- Passing Parameters
- Custom Tag Libraries
- Tag Library Architecture
- Implementing in Java or JSP
- Strategies for Thread Safety
- XML and JSP
- JSP for Web Services
Appendix A. Learning Resources
|Hardware Requirements (Minimum)||500 MHz, 256 meg RAM, 500 meg disk space.|
|Hardware Requirements (Recommended)||1.5 GHz, 512 meg RAM, 1 gig disk space.|
|Operating System||Tested on Windows XP Professional. Course software should be viable on all systems which support the J2EE 1.4 reference implementation.|
|Network and Security||Limited privileges required|
|Software Requirements||All free downloadable tools.|
Server Support: Tomcat
- This version of the course works with the Tomcat server. Our Java EE courses are available in variants that support various server products, including Tomcat, GlassFish, JBoss, and WebLogic. For more details, and to find a desired server-specific version of a course, see our server-support matrix.
IDE Support: Eclipse WTP 1.5
- In addition to the primary lab files, an optional overlay is available that adds support for Eclipse WTP 1.5. Students can code, build, deploy, and test most exercises from within the IDE.
Other courses to explore:
Don’t forget to check out our monthly specials to save – Monthly Specials