coreservlets
Class ProtectedPage
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--coreservlets.ProtectedPage
- public class ProtectedPage
- extends HttpServlet
Example of password-protected pages handled directly
by servlets.
Taken from Core Servlets and JavaServer Pages
from Prentice Hall and Sun Microsystems Press,
http://www.coreservlets.com/.
© 2000 Marty Hall; may be freely used or adapted.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ProtectedPage
public ProtectedPage()
init
public void init(ServletConfig config)
throws ServletException
- Read the password file from the location specified
by the passwordFile initialization parameter.
- Overrides:
- init in class GenericServlet
doGet
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Overrides:
- doGet in class HttpServlet
doPost
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Handle GET and POST identically.
- Overrides:
- doPost in class HttpServlet
 |
|---|
| CSAJSP @ amazon.com |
|---|