dfischer.femtowebserver.test
Class TestWeblet

java.lang.Object
  |
  +--dfischer.femtowebserver.test.TestWeblet
All Implemented Interfaces:
HttpdWebletInterface

public class TestWeblet
extends java.lang.Object
implements HttpdWebletInterface

This Weblet example displays the HTML text "This is a Test Weblet".

 Sourcecode

 package dfischer.femtowebserver.test;
 import dfischer.femtowebserver.httpd.*;

 public class TestWeblet implements HttpdWebletInterface
 {
 
     public void execute(HttpRequest req, HttpResponse res, HttpdProperties httpdProperties) throws Exception
     {
         res.println("<HTML>");
         res.println("<BODY>");
         res.println("This is a Test Weblet");
         res.println("</BODY>");
         res.println("</HTML>");
     }
 } 
 


Constructor Summary
TestWeblet()
           
 
Method Summary
 void execute(HttpRequest req, HttpResponse res, HttpdProperties httpdProperties)
          Executes the Weblet.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestWeblet

public TestWeblet()
Method Detail

execute

public void execute(HttpRequest req,
                    HttpResponse res,
                    HttpdProperties httpdProperties)
             throws java.lang.Exception
Executes the Weblet.
Specified by:
execute in interface HttpdWebletInterface
Parameters:
req - HTTP request data
res - HTTP response data of the Weblet
httpdProperties - properties of the Femto Web Server