Class LoginHandler
java.lang.Object
|
+----javax.servlet.GenericServlet
|
+----javax.servlet.http.HttpServlet
|
+----LoginHandler
- public class LoginHandler
- extends HttpServlet
This class gets the form data and compares the crypted password for
the user with that stored in the Server Database and sets a cookie at
the browser end, at the same time storing it with the Server, if the
user has authenticated himself.If the authentication fails then a
mail is sent to the user, so that he can know of any attempt
-
myCom
-
-
passwd
-
-
LoginHandler()
-
-
allowUser(String, String)
-
-
CommonFunc(HttpServletRequest, HttpServletResponse)
-
-
doGet(HttpServletRequest, HttpServletResponse)
- This method handles data received when secure method is used, the
password is already crypted and it just invokes the CommonFunc
method.
-
doPost(HttpServletRequest, HttpServletResponse)
- This method handles data received when insecure method is used, the
password is crypted and the CommonFunc method is invoked.For
crypting it uses the getChallenge method of the PassField class.
-
UserEmail(String)
-
passwd
public static String passwd
myCom
public static Connection myCom
LoginHandler
public LoginHandler()
doGet
public void doGet(HttpServletRequest req,
HttpServletResponse res) throws ServletException, IOException, IllegalStateException
- This method handles data received when secure method is used, the
password is already crypted and it just invokes the CommonFunc
method.
- Overrides:
- doGet in class HttpServlet
doPost
public void doPost(HttpServletRequest req,
HttpServletResponse res) throws ServletException, IOException, IllegalStateException
- This method handles data received when insecure method is used, the
password is crypted and the CommonFunc method is invoked.For
crypting it uses the getChallenge method of the PassField class.
- Overrides:
- doPost in class HttpServlet
CommonFunc
public void CommonFunc(HttpServletRequest req,
HttpServletResponse res) throws IOException
allowUser
protected boolean allowUser(String user,
String passwd) throws SQLException
UserEmail
protected String UserEmail(String user) throws SQLException