There's no need to throw your existing CGI scripts away. Any CGI script you can run on other web servers, such as Apache, you can run on the JavaTM Web ServerTM -- including scripts written in C, C++, and Perl. This document tells you how.
Note: While it's true you can run your existing CGI scripts on the Java Web Server, you can gain improved performance and code simplicity by using servlets instead. For help in re-writing your CGI scripts as servlets, see Replacing CGI Scripts with Servlets.
The arguments can be passed to CgiServlet at the load/initialization time by specifying the arguments as part of the server configuration.
Descriptions and default settings for these arguments are given below. On UNIX platforms, the default setup should work with no change. On Windows 95 and Windows NT platforms, you will likely have to set perlexe.
cgi-bin
.
The value is relative to server_root. If you wanted to change
the location to server_root/gdb-bin
, for example,
you would enter:
bindir=gdb-bin
perlexe=c:/Perl/bin/Perl.exe
/bin/cgilaunch
. The Java Web Server
comes with the source code for cgilaunch
to allow you to add
your own key environment settings.
/cgi-bin
. This
means invoking the servlet looks the same as invoking CGI directly. For
example, to run the CGI script test
, you would simply enter the
following into the locator field of your browser:
http://host/cgi-bin/test?arg1, arg2
Top java-server-feedback@java.sun.com |
Copyright© 1997 Sun Microsystems, Inc. All Rights Reserved. |