Class ChpassWd
java.lang.Object
|
+----javax.servlet.GenericServlet
|
+----javax.servlet.http.HttpServlet
|
+----ChpassWd
- public class ChpassWd
- extends HttpServlet
This servlet is invoked when a user wants to change the password,
It has different methods for secure(get) and insecure(post) modes of
access.While in the post method the received password has to be
crypted before comparing with the one in the database, the one in
get method comes already encrypted.
-
myCom
-
-
out
-
-
pass2
-
-
passwd
-
-
ChpassWd()
-
-
doCommon(HttpServletRequest, HttpServletResponse)
- The method checks if the user has been authenticated, if yes
changes the password, else the user is returned back to the login
page.
-
doGet(HttpServletRequest, HttpServletResponse)
- For secure method of access
-
doPost(HttpServletRequest, HttpServletResponse)
- For insecure method of access.
myCom
public static Connection myCom
out
public static PrintWriter out
passwd
public static String passwd
pass2
public int pass2
ChpassWd
public ChpassWd()
doGet
public void doGet(HttpServletRequest req,
HttpServletResponse res) throws IOException, ServletException
- For secure method of access
- Overrides:
- doGet in class HttpServlet
doPost
public void doPost(HttpServletRequest req,
HttpServletResponse res) throws IOException, ServletException
- For insecure method of access.
- Overrides:
- doPost in class HttpServlet
doCommon
public void doCommon(HttpServletRequest req,
HttpServletResponse res) throws IOException, ServletException
- The method checks if the user has been authenticated, if yes
changes the password, else the user is returned back to the login
page.