Servertec SSI Tester
Content
Introduction
Release Notes
Features
FAQs
Requirements
Installation
Add-ons
How To
Change Log
Future Plans
Knowledge Base
Documentation
Samples
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
Legal
Contact Us

 

This example tests Server Side Includes (SSI) support. It first displays a form allowing GET/POST to be tested and once Submit Query is press it dumps all SSI variables, display a file's timestamp and size, displays the captured output of a simple shell command and changes and tests configuration parameters.

Before exec tests can be used the following changes must be made:

  • Requires that iws_dir/classes/optional.jar be present in the CLASSPATH.

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

  • For Windows 9x/Me:

    • change the Servlet definition for SSIncludeServlet as follows:

      Alias: SSIncludeServlet
      Class File: stec.iws.SSIncludeServlet
      Parameter: bindir=./
      Parameter: exec=c:\windows\command.com /c

    • change line 428 of c:\iws\samples\ssi\ssitester.shtml to:

      <!-- #exec cmd="c:\windows\command.com /c c:\iws\cgi-bin\cgitester.bat" -->

  • For Windows NT/2000/2003:

    • change the Servlet definition for SSIncludeServlet as follows:

      Alias: SSIncludeServlet
      Class File: stec.iws.SSIncludeServlet
      Parameter: bindir=./
      Parameter: exec=c:\winnt\system32\cmd.exe /c

    • change line 428 of c:\iws\samples\ssi\ssitester.shtml to:

      <!-- #exec cmd="c:\winnt\system32\cmd.exe /c c:\iws\cgi-bin\cgitester.bat" -->

  • In Windows XP:

    • change the Servlet definition for SSIncludeServlet as follows:

      Alias: SSIncludeServlet
      Class File: stec.iws.SSIncludeServlet
      Parameter: bindir=./
      Parameter: exec=c:\windows\system32\cmd.exe /c

    • change line 428 of c:\iws\samples\ssi\ssitester.shtml to:

      <!-- #exec cmd="c:\windows\system32\cmd.exe /c c:\iws\cgi-bin\cgitester.bat" -->

  • In Lixux/Solaris/Unix change the Servlet definition for SSIncludeServlet as follows:

    Alias: SSIncludeServlet
    Class File: stec.iws.SSIncludeServlet
    Parameter: bindir=./
    Parameter: exec=/bin/sh

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.

This example uses ssitesterform.shtml , ssitester.shtml and include.inc.

[ view source ] [ run ]

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