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>");
}
}
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestWeblet
public TestWeblet()
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 datares - HTTP response data of the WeblethttpdProperties - properties of the Femto Web Server