Where Do I Start?


Your first step is to build a simple Web page that will launch your first application. This page will simply include a link to the CGI program. The same link could be included in other Web pages that you might already have, such as a corporate home page.

Figure 31.22 shows the code for a sample Web page to launch your test application. It is HTML code stored in member GETCUS of file DEMOHTML in library CGIDEV2. You can use SEU and PDM (or any other editor, such as LPEX) to edit this file.

image from book
Figure 31.22: Here's the HTML code for CGIDEV2/DEMOHTML MBR(GETCUS).

Point your Web browser at this Web page using the following link: http://www.ip-addr/cgidev2o/getcus.htm.

The HTTP Server will redirect that browser to the HTML code stores in the file you just created and then display the page shown in Figure 31.23.

image from book
Figure 31.23: Here's your first Web page.

When the user clicks the Show Customers button, the HTTP Server on the iSeries will launch the program GETCUS from CGIDEV2. The action attribute of the HTML form determines the program called (action="/cgidev2p/getcus.pgm"). Of course, before you can call that program, you have to write that program!



IBM i5/iSeries Primer(c) Concepts and Techniques for Programmers, Administrators, and Sys[... ]ators
IBM i5/iSeries Primer(c) Concepts and Techniques for Programmers, Administrators, and Sys[... ]ators
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 245

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net