These commands should be written in a .shtml file that is indexed as a FileResource associated with a SSIFrame. The commands are separated in two parts:
<!--#config sizefmt="bytes" -->
<!--#cookie get="C1" alt="hello" -->, display the value of the cookie "C1" or "hello" if the cookie is not in the incomming request. <!--#cookie if="C1" then="hello" alt="bye"-->, display "hello" if the cookie "C1" is in the request. If not display "bye"
<!--#hitcount -->
<!--#echo var="DOCUMENT_URI" --> display the document uri <!--#echo reqheader="referer" --> display the referer header of the request <!--#echo reqstate="pathinfo" --> display the request state "pahtinfo"
<!--#exec cmd="ls -lsa" -->
display the result of the ls command
<!--#flastmod-->
<!--#fsize -->
<!--#include file="included.html" --> include the file "included.html" in the current file <!--#include ifheader="Referer" file="included.html" else="included2.html" --> if the request has a Referer header then include "included.html" else include "included2.html"
<!--#jdbc select="SELECT * FROM services" name="result" driver="com.imaginary.sql.msql.MsqlDriver" url="jdbc:msql://www43.inria.fr:4333/services" --> this is the setup of the command. <!--#jdbc name="result" next="true" --> this command move the pointer to the next line of the result set. <!--#jdbc name="result" column="1" --> display the first column of the current line. <!--#jdbc name="result" column="2" --> display the second column of the current line. <!--#jdbc name="result" column="3" --> display the third column of the current line.
<!--#servlet name="Snoop" param="p1" value="v1" -->
<!--#servlet name="Snoop" param="p2" value="v2" -->
<!--#servlet name="Snoop" param="p3" value="v3" -->
<!--#servlet name="Snoop" code="/servlet/snoop" -->
<!--#cpt name="cpt1" init="0" --> Initialisation: cpt1 = 0 <!--#cpt name="cpt1" incr="1" --> cpt1 = cpt1 + 1 <!--#cpt name="cpt1" value="true" --> display the current value of cpt1
<!--#else name="if2" -->
<!--#endif name="if2" -->
<!--#endloop name="loop2" -->
<!--#exitloop name="loop2" command="cpt" var="cpt1" equals="4" -->
<!--#if name="if2" command="cpt" var="cpt1" equals="2" -->
<!--#loop name="loop2" -->
<!--#jdbc name="result2" select="SELECT * FROM users"
user="bmahe" password=""
url="jdbc:msql://www43.inria.fr:4333/users"
driver="com.imaginary.sql.msql.MsqlDriver" -->
<table border=2>
<!--#cpt name="cpt1" init="0" -->
<tr><td><b>Name </td><td><b>Login</td>
<td><b>Email</td><td><b>Age </td></tr>
<!--#loop name="loop2" -->
<!--#jdbc name="result2" next="true" -->
<tr>
<td>
<!--#jdbc name="result2" column="1" -->
</td><td>
<!--#jdbc name="result2" column="2" -->
</td><td>
<!--#jdbc name="result2" column="3" -->
</td><td>
<!--#jdbc name="result2" column="4" -->
</td>
</tr>
<!--#cpt name="cpt1" incr="1" -->
<!--#exitloop name="loop2" command="cpt" var="cpt1" equals="3" -->
<!--#endloop name="loop2" -->
</table>
counter value : <!--#cpt name="cpt1" value="true" -->
The result could be:
| Name | Login | Age | |
| Smith | ssmith | ssmith@foobar.org | 25 |
| lafrim | ylafrim | lafrim@foobar.org | 25 |
| Teole | pteole | teole@foobar.org | 27 |