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


Constructor Index

 o ChangePassword()

Method Index

 o doGet(HttpServletRequest, HttpServletResponse)
Gives a form to enter new password and submits the same form to this very servlet
 o doPost(HttpServletRequest, HttpServletResponse)
Puts the new submitted password into the DB
 o init(ServletConfig)
Initialise the servlet

Constructors

 o ChangePassword
 public ChangePassword()

Methods

 o init
 public void init(ServletConfig config) throws ServletException
Initialise the servlet

Parameters:
config - ServletConfig
Overrides:
init in class GenericServlet
 o 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
 o 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