Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / real-world application / jigsaw / WWW / Doc / User / cgi.html
diff --git a/JMCR-Stable/real-world application/jigsaw/WWW/Doc/User/cgi.html b/JMCR-Stable/real-world application/jigsaw/WWW/Doc/User/cgi.html
new file mode 100644 (file)
index 0000000..795855c
--- /dev/null
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"\r
+   "http://www.w3.org/TR/REC-html40/loose.dtd">\r
+<html>\r
+<head>\r
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r
+<link rel="stylesheet" type="text/css" href="../style/doc.css">\r
+<title>CGI scripts in Jigsaw</title>\r
+</head>\r
+<body text="#000000" bgcolor="#FFFFFF">\r
+    <div class="icons-w3c">\r
+      <a href="../../../">\r
+       <img src="/Icons/w3c_home" \r
+         border="0" \r
+         alt="W3C logo"\r
+         height="48" \r
+         width="72">\r
+      </a>\r
+    </div>\r
+    <div class="icons-jigsaw">\r
+      <a href="../../">\r
+       <img src="/Icons/jigsaw" \r
+         border="0"\r
+         alt="Jigsaw"\r
+         height="49"\r
+         width="212">\r
+      </a>\r
+    </div>\r
+\r
+    <div class="title">\r
+<h1 class="title">CGI scripts</h1>\r
+<hr noshade="noshade" width="70%" align="left">\r
+\r
+\r
+<a href="../../Overview.html">Jigsaw Home</a> / <a\r
+href="../Overview.html">Documentation Overview</a> /\r
+      <a href="Tutorials.html">Tutorials</a>\r
+    </div>\r
+    <div class="body">\r
+\r
+<p>They are two ways to setup <b>CGI</b> scripts. The manual way requires that\r
+you describe each script to the server. Let's say your script's path relative\r
+to the server root is <tt>WWW/cgi-bin/myscript</tt>. You will first have to\r
+create an appropriate <a\r
+href="../Reference/org.w3c.tools.resources.FileResource.html">org.w3c.tools.resources.FileResource</a>\r
+with a <a\r
+href="../Reference/org.w3c.jigsaw.frames.CgiFrame.html">org.w3c.jigsaw.frames.CgiFrame</a>\r
+instance to wrap your script. See this <a href="resource.html">tutorials</a>\r
+to know how to create a resource in <b>Jigsaw</b>.</p>\r
+\r
+<p>Then edit the newly created resource, and setup it's command line (the\r
+command line the server will use to run your script). Each line of the text\r
+field should represent one argument, the first one being the script full\r
+path.</p>\r
+\r
+<p>You can also register files of a given extension as scripts, by using a\r
+specialized <a href="indexers.html">indexer</a>.&nbsp; When required, you can\r
+even specify the interpreter to be run to execute the script (for example perl\r
+scripts). <br>\r
+<img src="images/cgi.gif" alt="CGI configuration" hspace="10" vspace="20"\r
+height="528" width="492"> <br>\r
+In this sample the CGI script is a perl script, as you can see the interpreter\r
+location must be specified (in the <tt>Interpreter</tt> field). Read the <a\r
+href="../Reference/org.w3c.jigsaw.frames.CgiFrame.html">CgiFrame reference\r
+page</a> for more details on CgiFrame configuration.</p>\r
+\r
+<p></p>\r
+\r
+<p><strong>Note:</strong> Some CGI scripts may have problems if the "current\r
+directory" is not set, it is something we can't do in Java, so you may have to\r
+wrap your script in another one that set the current directory (by using the\r
+<strong>cd</strong> command).</p>\r
+\r
+<p></p>\r
+<hr width="30%" align="left" noshade="noshade">\r
+\r
+<pre><code>wrapper.bat:</code><code>\r
+D:</code><code>\r
+cd c:\foo\bar</code><code>\r
+mycgi.exe</code></pre>\r
+    </div> <!-- body -->\r
+    <div class="footer">\r
+<p></p>\r
+<hr noshade="noshade" width="100%">\r
+\r
+\r
+<a href="mailto:jigsaw@w3.org">Jigsaw Team</a><br>\r
+<span class="mini"> $Id: cgi.html,v 1.1 2010/06/15 12:23:02 smhuang Exp $\r
+</span>\r
+\r
+<p class="policyfooter"><font size="-1"><a\r
+href="/Consortium/Legal/ipr-notice.html#Copyright">Copyright</a> &copy; 1999\r
+<a href="http://www.w3.org">W3C</a> (<a href="http://www.lcs.mit.edu">MIT</a>,\r
+<a href="http://www.inria.fr/">INRIA</a>, <a\r
+href="http://www.keio.ac.jp/">Keio</a> ), All Rights Reserved. W3C <a\r
+href="/Consortium/Legal/ipr-notice.html#Legal Disclaimer"> liability, </a> <a\r
+href="/Consortium/Legal/ipr-notice.html#W3C Trademarks"> trademark </a>, <a\r
+href="/Consortium/Legal/copyright-documents.html"> document use </a> and <a\r
+href="/Consortium/Legal/copyright-software.html"> software licensing </a>\r
+rules apply. Your interactions with this site are in accordance with our <a\r
+href="/Consortium/Legal/privacy-statement.html#Public"> public </a> and <a\r
+href="/Consortium/Legal/privacy-statement.html#Members"> Member </a> privacy\r
+statements.</font></p>\r
+    </div>\r
+</body>\r
+</html>\r