dfischer.femtowebserver.test
Class RedirectTestWeblet
java.lang.Object
|
+--dfischer.femtowebserver.test.RedirectTestWeblet
- All Implemented Interfaces:
- HttpdWebletInterface
- public class RedirectTestWeblet
- extends java.lang.Object
- implements HttpdWebletInterface
This Weblet example redirects the browser to http://www.d-fischer.com .
Sourcecode
package dfischer.femtowebserver.test;
import dfischer.femtowebserver.httpd.*;
public class RedirectTestWeblet implements HttpdWebletInterface
{
public void execute(HttpRequest req, HttpResponse res, HttpdProperties httpdProperties) throws Exception
{
res.setAdditionalHeaderField("Location", "http://www.d-fischer.com");
res.setStatus(302, "Found");
}
}
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RedirectTestWeblet
public RedirectTestWeblet()
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