Servertec CGI Tester
Content
Introduction
Release Notes
Features
FAQs
Requirements
Installation
How To
Change Log
Future Plans
Knowledge Base
Documentation
Examples
Hello World
Display Arguments
Display Headers
URL Redirect
CGI Tester
SSI Tester
Servlet Tag
Servlet Chaining
Log
Cookie Counter
Cookie Tester
Protected Page
List Employees
Connection Pool
Simple Form
Dump Form
Page Counter
File Upload
Session Tester
Context Tester
C++ .NET
C# .NET
J# .NET
Visual Basic .NET
JavaServer Pages
Legal
Contact Us

 

This example tests the Common Gateway Interface (CGI). It first displays a form allowing GET/POST to be tested and once Submit Query is press it dumps all CGI variables.

Before this example can be used the following changes must be made:

  • Shell Access must be enabled in the Administrator - Server form.

  • In Windows 9x/Me change the Servlet definition for CgiServlet as follows:

    Alias: CgiServlet
    Class File: stec.iws.CgiServlet
    Parameter: bindir=./cgi-bin
    Parameter: exec=c:\windows\command.com /c

  • In Windows NT/2000/2003 change the Servlet definition for CgiServlet as follows:

    Alias: CgiServlet
    Class File: stec.iws.CgiServlet
    Parameter: bindir=./cgi-bin
    Parameter: exec=c:\winnt\system32\cmd.exe /c

  • In Windows XP change the Servlet definition for CgiServlet as follows:

    Alias: CgiServlet
    Class File: stec.iws.CgiServlet
    Parameter: bindir=./cgi-bin
    Parameter: exec=c:\windows\system32\cmd.exe /c

In Windows NT/2000/2003 QUERY_STRING and QUERY_STRING_UNESCAPED will display The name specified is not recognized as an internal or external command, operable program or batch file. for each & contained in the QUERY_STRING.

Depending on how the File Type for .bat is defined, Microsoft Internet Explorer may prompt to Save this program to disk when this example is run. Simply press OK and edit the saved item to view the results.

This example uses cgitesterform.shtml , cgitester.shtml, include.inc and cgitester.bat.

[ view source ] [ run ]

 top of page
Copyright © 1998-2005 Servertec. All rights reserved.
Privacy Statement.
Last Modified: Sun Sep 04 14:57:20 EDT 2005