Parsing of Simple Result Set Example

Demonstration

This example demonstrates the simplest parsing of a result set using the JavaCGIBridge. It merely reads in a CGI script which is sending over 100 records consisting of 4 fields each. The plain text that is sent from the CGI/Perl script is then displayed inside the TextArea on the applet.

Basically, the fields that are returned are then Enumerated using the Vector of Vector which contains the parsed records. The applet then takes each field and encloses it with brackets [] and separates them further with colons (:) in order to make them stand out. The first field is always the character "1", the second field is a blank field, the third field is an increasing record number, and the fourth field is simply a string saying "4th column".

Notice that the second column of each record is just an empty bracket set. This demonstrates that when there is no data between field separators, JavaCGIBridge inserts an empty string ("") in place of that field. JavaCGIBridge currently makes sure that all data pointed to by the Vectors are real Strings or byte arrays depending on your parsing choices. There is no such thing as NULL in JavaCGIBridge parsed result sets.

Pure JavaCGIBridge Example Parsing Applet

View The Source To Example3Applet.java

View The Source To JavaCGI Bridge.java

View The JavaCGIBridge JavaDoc File

View The Source To JavaCGIBridgeTimeOutException.java

View The JavaCGIBridgeTimeOutException JavaDoc File

View The Source To test_many_results.cgi

Plain CGI script retrieving 100 records

Run test_many_results.cgi CGI/Perl Script

Gunther Birznieks <gunther@clark.net>