Here's an example of how sand works .....





import uk.co.westhawk.servlet.sand.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.*;


public class Example extends SandServlet {

    protected void doGet(HttpServletRequest req, HttpServletResponse
res) throws javax.servlet.ServletException, java.io.IOException {
    PrintWriter o = res.getWriter();
    Date date = new Date();

/*SandGrainBegin=Intro
<HTML>
<Head>
<Title>
Example of Sand usage.
</Title>
</Head>
<Body>
<H1>
Example of Sand usage.
</H1>
SandGrainEnd*/

    oh(o,"Intro");

/*SandGrainBegin=Main
I don't advise <b>anyone</b> to actually use this sort of
Embedded HTML in java. <p> That is why there is <b>no error checking</b>
in SnadGrain. It was done to prove that it could be done, not because it
is
useful to do so.
So repeat after me <br>
SandGrainEnd*/

    oh(o,"Main");


/*SandGrainBegin=LoopStart
"I will not use SandGrain."
<OL>
SandGrainEnd*/
    oh(o,"LoopStart");

/*SandGrainBegin=Repeat
<LI>"I will not use SandGrain."</LI>
SandGrainEnd*/

    for (int i=0;i<10;i++){

        oh(o,"Repeat");
    }
/*SandGrainBegin=WrapUp
</OL>
<p>
SandGrain Servlet ran at
SandGrainEnd*/
    oh(o,"WrapUp");
    o.print(date.toGMTString());
/*SandGrainBegin=Finish
</Body>
</Html>
SandGrainEnd*/
    oh(o,"Finish");
}

}



It is at http://www.westhawk.co.uk/software/sand.tar


Tim.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to