Class ChangePassword
java.lang.Object
|
+----javax.servlet.GenericServlet
|
+----javax.servlet.http.HttpServlet
|
+----ChangePassword
- public class ChangePassword
- extends HttpServlet
This servlet changes the password of any user(admin/reviewer/contact-author)
On invoking the servlet using "GET" method, the doGet() method presents an HTML
form with fields to enter and confirm new password.The user is identified using
HttpSession.This form will do a "POST" to do this servlet only.Then the doPost()
method will make the appropriate changes in DB
-
ChangePassword()
-
-
doGet(HttpServletRequest, HttpServletResponse)
-
Gives a form to enter new password and submits the same form to this very servlet
-
doPost(HttpServletRequest, HttpServletResponse)
- Puts the new submitted password into the DB
-
init(ServletConfig)
- Initialise the servlet
ChangePassword
public ChangePassword()
init
public void init(ServletConfig config) throws ServletException
- Initialise the servlet
- Parameters:
- config - ServletConfig
- Overrides:
- init in class GenericServlet
doPost
public void doPost(HttpServletRequest req,
HttpServletResponse res) throws ServletException, IOException
- Puts the new submitted password into the DB
- Parameters:
- req - HttpServletRequest
- res - HttpServletResponse
- Overrides:
- doPost in class HttpServlet
doGet
public void doGet(HttpServletRequest req,
HttpServletResponse res) throws ServletException, IOException
- Gives a form to enter new password and submits the same form to this very servlet
- Parameters:
- req - HttpServletRequest
- res - HttpServletResponse
- Overrides:
- doGet in class HttpServlet