Java Technology Home Page
A-Z Index

Java Developer Connection(SM)
Online Training

Downloads, APIs, Documentation
Java Developer Connection
Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide
Print Button
 

JavaServer PagesTM Fundamentals
Exercises

By jGuru

[Short Course| About This Short Course]

Exercise Outline

Welcome to the jGuru exercises for the JavaServer PagesTM Fundamentals Short Course.

These exercises demonstrate how to use Tomcat -- the JSP 1.1 Reference Implementation, as well as how to design, implement, and deploy JSPs.

When you finish these exercises, you will know the basic steps for designing, compiling, and deploying JSP web components.

About Exercises

A jGuru exercise is a flexible exercise that provides varying levels of help according to the student's needs. Some students may complete the exercise using only the information and the task list in the exercise body; some may want a few hints (Help); while others may want a step-by-step guide to successful completion (Solution). Since complete solutions are provided in addition to help, students can skip an exercise and still complete later exercises that required the skipped one(s).

The Anatomy of an Exercise

Each exercise includes a list of any prerequisite exercises, a list of skeleton code to start with, links to necessary API pages, and a text description of the exercise's educational goal. In addition, buttons link you to the following information:

  • Help: Gives you help or hints on the current exercise, an annotated solution. For ease of use, the task information is duplicated on the help page with the actual help information indented beneath it.
  • Solution: The <applet> tag and Java source resulting in the expected behavior.
  • API Documentation: A link directly to any necessary online API documentation.

Exercise Design Goals

There are three fundamental exercise types that you may encounter:

"Blank screen"
You are confronted with a "blank screen" and you create the entire desired functionality yourself.
Extension
You extend the functionality of an existing, correctly-working program.
Repair
You repair undesirable behavior in an existing program.

To make learning easier, exercises, where possible, address only the specific technique being taught in that exercise. Irrelevant, unrelated, and overly complex materials are avoided.

Where possible, exercises execute on the Web. However, exercises that must access Java features or library elements that could cause security violations are not executed on the web.

JavaServer Pages Fundamentals Exercises

Exercises

  1. Installing and Configuring Tomcat

    This exercise steps you through the process of downloading and installing Tomcat--the JSP 1.1 Reference Implementation (RI). Tomcat comprises of a simple HTTP server as well as a Web container that can run JSP pages and servlets. Tomcat supports the Servlet 2.2 and JSP 1.1 specifications. We use this server for the subsequent exercises.

    Educational goal(s):

    • Install Tomcat.
    • Configure your machine properly for compiling and deploying JSPs.

  2. Exception Handling in JSP

    In this exercise you learn how to redirect runtime exceptions occurring within a JSP page to an error handling page.

    Educational goal(s):

    • Learn how to handle runtime exceptions occurring within JSP pages by automatically forwarding them to an error handler page.
    • Understand how exceptions can be accessed from within a JSP error handler page.

  3. Understanding JSP Object Scope

    In this exercise you observe the behavior of a Counter bean when used within a JSP page with different scope attributes.

    Educational goal(s):

    • Understand the importance of the scope attribute when instantiating beans using the useBean tag.
    • Examine the difference between session and application scope.

  4. Form Processing Using JSP

    In this exercise you learn how to process HTML forms using JSPs, and understand the introspective features provided by the JSP engine.

    Educational goal(s):

    • Understand the ease with which HTML forms can be processed using JSP pages.
    • Understand the role played by beans in streamlining form processing.

Copyright 1996-2000 jGuru.com. All Rights Reserved.


Print Button
[ This page was updated: 21-Sep-2000 ]
Products & APIs | Developer Connection | Docs & Training | Online Support
Community Discussion | Industry News | Solutions Marketplace | Case Studies
Glossary | Feedback | A-Z Index
For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-2000 Sun Microsystems, Inc.
All Rights Reserved. Terms of Use. Privacy Policy.