Basic HTML version of Foils prepared Sept 21 1998

Foil 50 Connecting to a CGI Script

From Java Tutorial 98- 4: Multi-Treading, Useful Java Classes, I/O and Networking NAVO Tutorial -- Sept 23 1998. by Geoffrey C. Fox, Nancy McCracken

Additional network examples for Foil 50
1 Although an applet can read files from a web server machine, as in, for example, establishing a URL connection and doing getInputStream(). Applets are not allowed to directly write to files on the web server machine by doing getOutputStream(). (Java applications can do this!)
2 The applet can establish a socket the URL of the web server. Then it uses an OutputStream on the socket to send a message formatted in MIME, just as if it were from the browser. The header of this message requests the web server to run a CGI script. In addition, the applet can send data in the body of the message for the CGI script to read. And the CGI script can send back a MIME message to the applet.

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Nov 28 1998