112-WL. Introduction to JSP with WebLogic Version 10.3.0 This two-day module 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. This version of the course is designed to work with Oracle® WebLogic 10.3: labs are all tested on this platform. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. No association with or endorsement by Oracle Corporation is implied by the use of these terms in this document. Prerequisites * 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. Learning Objectives * 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. Timeline: 2 days. IDE Support: Workshop 10.3 In addition to the primary lab files, an optional overlay is available that adds support for Workshop 10.3. Students can code, build, deploy, and test most exercises from within the IDE. See also our orientation to Using Capstone's Eclipse Overlays, and please be advised that this is an optional feature; it is not a separate version of the course, and the course itself does not contain explicit Eclipse-specific lab instructions. Chapter 1. Web Applications The World Wide Web HTML Web Servers HTTP Dynamic Web Pages CGI Java Web Technologies Servlets JSP The WebLogic Server Creating a Domain Deploying to WebLogic Chapter 2. JSP Architecture JSP Containers Servlet Architecture Page Translation Types of JSP Content Directives Content Type Buffering 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 Scriptlets Expressions Declarations 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 JavaBeans Working with Properties and 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 Forwarding Inclusion Passing Parameters Custom Tag Libraries Tag Library Architecture Implementing in Java or JSP Threads Strategies for Thread Safety XML and JSP JSP for Web Services Appendix A. Learning Resources System Requirements Hardware, Minimum: 1 gHz, 1 gB RAM, 3 gB disk space. Hardware, Recommended: 2 gHz, 2 gB RAM, 5 gB disk space. Operating System: Tested on Windows XP Professional. Network and Security: Limited privileges required -- please see our standard security requirements at http://capcourse.com/Guides/Security.gen.html. Software Requirements: Course software should be viable on all systems for which WebLogic 10.3 is available.