J2EEOnline J2EE

CGI Forms   «Prev  Next»
Lesson 1

Introduction to CGI and Forms

This module is a thorough introduction to CGI and discusses how a CGI program interfaces with the Web server, how it communicates with the Web client or browser.
Some of the concepts introduced in this module are:
  1. The GET and POST methods
  2. Form data-encoding
  3. The query string
  4. Form elements, or widgets

When you are done with this module, you should have a good understanding of how Web forms work and how to interact with them using CGI.

Your public_html directory
The training server has been set up so that each user has their own web space underneath their home directory. All files which will be accessible via the web should be placed in the directory named public_html. This is common for most personal homepages. The directory ~username/public_html on the Unix file system maps to the
URL http://hostname/~username/ 

via the web. Replace username with your username. Your instructor will tell you what the hostname is.

Web Programming

The Internet is the most important source of bioinformatics data. From FTP sites to web-enabled programs, the Perl programmer who is literate in bioinformatics needs to be able to access web resources. Just about every lab has to have its own web page these days, and many grants even require it. You will need to learn the basics about the HTML and XML markup languages that display web pages, about the difference between a web server and a web browser, and j2eeonline.com provides you with all the information that you need.
The popular CGI.pm module makes it fairly easy to create interactive web pages, and several other modules are available that make Internet programming tasks relatively easy. For instance, you can write code for your own web page that enables visitors to try out your latest sequence analyzer or search through your special-purpose database. You can also add code to your own programs to enable them to interact with other web sites, querying and retrieving data automatically. Collaborators who are geographically diverse can use such web programming to work cooperatively on a project, whether you are in Brazil or Russia.