Java
  Home arrow Java arrow Developing JavaServer Pages
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
JAVA

Developing JavaServer Pages
By: Joel Murach
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 64
    2004-05-12


    Table of Contents:
  • Developing JavaServer Pages
  • The Code for the HTML Page that Calls the JSP
  • Imitating HTML
  • How to Create a JSP
  • How to Use the Methods of the Request Object
  • Retrieving Multiple Values
  • How to Request a JSP
  • Using Get and Post Methods
  • Using the Post Method
  • Managing Java Classes
  • Class Location

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Developing JavaServer Pages
    ( Page 1 of 11 )

    In this excerpt from chapter 4 of Joel Murach's Java Servlets and JSP, you'll learn how to develop a web application that consists of HTML pages and JavaServer Pages (JSPs). As you will see, JSPs work fine as long as the amount of processing that's required for each page is limited. When you complete this chapter, you should be able to use JSPs to develop simple web applications of your own.

    jspThe Email List Application

    This topic introduces you to a simple web application that consists of one HTML page and one JavaServer Page, or JSP. Once you get the general idea of how this application works, you'll be ready to learn the specific skills that you need for developing JSPs.

    The User Interface for the Application

    Figure 1 shows the two pages that make up the user interface for the Email List application. The first page is an HTML page that asks the user to enter a first name, last name, and email address. Then, when the user clicks on the Submit button, the HTML page calls the JSP and passes the three user entries to that page.

    JSP pages
    Figure 1: The user interface for the application
    The HTML page

    The JSP

    JavaServer Pages

    When the JSP receives the three entries, it could process them by checking them for validity, writing them to a file or database, and so on. In this simple application, though, the JSP just passes the three entries back to the browser so it can display the second page of this application. From this page, the user can return to the first page by clicking the Back button in the web browser or by clicking the Return button that's displayed on this page.

    Building Blocks

    As simple as this application is, you're going to learn a lot from it. In this chapter, you'll learn how to enhance this application so it uses regular Java classes to save the user entries in a text file. Then, in later chapters, you'll learn how to modify this application to illustrate other essential skills that apply to servlet and JSP programming.

    Remember: this is from chapter four of Joel Murach's Java Servlets and JSP (Mike Murach & Associates, ISBN 1890774189, 2003). Grab a copy at your favorite book store today!

    Buy this book now.



     
     
    >>> More Java Articles          >>> More By Joel Murach
     

       

    JAVA ARTICLES

    - Exception Handling Techniques in Java
    - More About Multithreading in Java
    - The Basics of Multiple Threads in Java
    - Data Access Using Spring Framework JDBC
    - New Object Initialization in Java
    - Adding Images With iTextSharp
    - Adding Columns With iTextSharp
    - Creating Simple PDF Files With iTextSharp
    - The Spring Framework: Understanding IoC
    - Introducing the Spring Framework
    - Java Classes
    - Completing the Syntactic Comparison of Java ...
    - Syntactic Comparison of Java and C/C++
    - Java Statements
    - Conditionals, Expressions and Other Java Ope...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek