Slide 13.4: Mobile Web user interface construction (WML)
  Slide 13.6: Calling a CGI script (Perl)
  Home


How to Construct My Memento (Cont.)

  1. Calling a CGI (Common Gateway Interface) Script (Unix Shell) CGI is a standard for running external programs from a World-Wide Web HTTP server. CGI specifies how to pass arguments to the executing program as part of the HTTP request. It also defines a set of environment variables. Commonly, the program will generate some WML pages which will be passed back to the microbrowser. For the previous interface, the following CGI script is activated once a button is clicked.

     ~wenchen/public_html/cgi-bin/handheld/wml/ListItems.cgi 
    #!/bin/sh
    
    PATH=$PATH:/home/Agassiz:/usr/java/bin:/usr/java/sdk/bin
    
    CLASSPATH=.:/home/Agassiz/project/oracle/OraHome1/jre/1.1.8
    CLASSPATH=$CLASSPATH:/home/Agassiz/project/oracle/OraHome1/jlib
    CLASSPATH=$CLASSPATH:/home/Agassiz/project/oracle/OraHome1/jdbc/lib/classes12.zip
    CLASSPATH=$CLASSPATH:/home/Agassiz/project/oracle/OraHome1/jdbc/lib/nls_charset12.zip
    CLASSPATH=$CLASSPATH:/home/Agassiz/project/oracle/OraHome1/sqlj/lib/runtime.zip
    CLASSPATH=$CLASSPATH:/home/Agassiz/project/oracle/OraHome1/sqlj/lib/translator.zip
    CLASSPATH=$CLASSPATH:/home/Agassiz/project/oracle/OraHome1/ord/jlib
    CLASSPATH=$CLASSPATH:/home/Agassiz/project/oracle/OraHome1/ord/ts/jlib
    CLASSPATH=$CLASSPATH:/home/Agassiz/project/oracle/OraHome1/rdbms/jlib
    CLASSPATH=$CLASSPATH:/usr/j2se/bin
    
    export CLASSPATH
    perl ListItems.pl

    The last statement calls a CGI Perl script, ListItems.pl .
    Note that this script is for setting the JDBC enviroment variables. If JDBC is not used in this function, you may skip this step.