Form Sample

If you are just getting started with HTML forms, this is the place to start. This sample shows how to get basic input data from a form and return it to the browser.

Run this sample

 


How this sample works:

This sample has:

  • An input form to enter data
  • A Java servlet that reads the input data, stores it in a Bean, and calls the output page
  • A JavaServer Page (JSP) that formats and displays the Bean data
  • A servlet file that provides information about the servlet to the WebSphere Application Server

When you enter data on the input form and click Submit, it calls the Java servlet. Servlets can do all kinds of processing. This one is simple; it just displays the data that was entered.


How to use this sample on your web page:

You can easily modify this sample and use it as a confirmation page to let people verify their input before it is committed to a database.