![]() |
|||
| Contents | / Index | / Glossary | / AdminTool Help |
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 Java Web Server(TM) -- 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 an example in re-writing your CGI scripts as servlets, see Processing Forms with Servlets.
Specify initial arguments when you configure the servlet in the
Administration Tool. To do this, set the initArg property
in the Properties panel of the Admintool's Servlet Configuration screen.
The arguments will be passed to CgiServlet when the
servlet is loaded and initialized. The Administration Tool:
Configuring Servlets online document describes
the screen where this configuration is performed
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-cgi.pl, you would simply enter the
following into the locator field of your browser:
http://host/cgi-bin/test-cgi.pl?arg1, arg2
Top
java-server-feedback@java.sun.com
|
Copyright © 1999
Sun Microsystems, Inc. All Rights Reserved. |