dfischer.femtowebserver.test
Class BasicAuthTestWeblet
java.lang.Object
|
+--dfischer.femtowebserver.test.BasicAuthGenericTestWeblet
|
+--dfischer.femtowebserver.test.BasicAuthTestWeblet
- All Implemented Interfaces:
- BasicAuthGenericTestInterface, HttpdWebletInterface
- public class BasicAuthTestWeblet
- extends BasicAuthGenericTestWeblet
This example displays a username/password protected page. It
inherits/extends the abstract BasicAuthGenericTestWeblet and implements the
BasicAuthGenericTestInterface which is a re-definition of the HttpdWebletInterface
by adding a valid, already authorized username.
The beauty of this kind of implementation is, that the authorization is already
(successfull) done, when this Weblet will be called from the BasicAuthGenericTestWeblet.
An other benefit is, that deep links can bookmarked. If (later) the authorization
has not been set, the user will first prompted for it and afterwards the bookmark will
be displayed. So there is no need of a single login procedure.
You can download the sourcecode of all examples at: http://www.d-fischer.com/femto/FemtoProgrammingExamplesSourcecode.zip
- See Also:
BasicAuthGenericTestInterface,
BasicAuthGenericTestWeblet
|
Method Summary |
void |
execute(HttpRequest req,
HttpResponse res,
HttpdProperties httpdProperties,
java.lang.String username)
Implements the BasicAuthGenericTestInterface which is a re-definition of the HttpdWebletInterface
by adding a valid, already authorized username. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicAuthTestWeblet
public BasicAuthTestWeblet()
execute
public void execute(HttpRequest req,
HttpResponse res,
HttpdProperties httpdProperties,
java.lang.String username)
throws java.lang.Exception
- Implements the BasicAuthGenericTestInterface which is a re-definition of the HttpdWebletInterface
by adding a valid, already authorized username.
Copyright 2002, 2003, 2006 by Ingenieurbüro David Fischer GmbH, Switzerland. All rights reserved.