Basic HTML version of Foils prepared 17 Nov 97

Foil 50 Connecting to a CGI Script

From Java Tutorial, July 1, 1996 CEWES Tutorial, CPS606, JSU Class CSC499 -- July 22-25 1997, Fall 97. by Nancy J. McCracken,Geoffrey C. Fox, Tom Scavo

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 Wed Apr 1 1998