: Class RegisterServlet

Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class RegisterServlet

    java.lang.Object
      |
      +--javax.servlet.GenericServlet
            |
            +--javax.servlet.http.HttpServlet
                  |
                  +--RegisterServlet

All Implemented Interfaces:
  java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class RegisterServlet
extends javax.servlet.http.HttpServlet

Control passes to the doGet method of this class from the registration page. All data entered by user are verified by methods of this class and entry in made for the usre in the database after all constraints are satisfied.

See Also:
  Serialized Form

Field Summary
`java.lang.String` | `address1`
`java.lang.String` | `city1`
`java.lang.String` | `day1`
`java.lang.String` | `email1`
`java.lang.String` | `firstName1`
`java.lang.String` | `gender1`
`java.lang.String` | `lastName1`
`java.lang.String` | `login1`
`java.lang.String` | `month1`
`boolean` | `repeat`
`java.lang.String` | `year1`

Constructor Summary
`RegisterServlet()`

Method Summary
`void` | `doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` `doGet` - This method uses methods of class QueryEngine to check for repetiton of username and email address.
`static java.lang.String` | `generatePassword(java.lang.String login)` This method generates a random password depending upon the login name which user selects.
`java.lang.String` | `getMonthValue(java.lang.String month)` This method takes a month name as an arguement and returns the corrosponding month number.
`static void` | `mailUserHisPassword(java.lang.String[] recipients, java.lang.String subject, java.lang.String message, java.lang.String from)` This method uses javax.mail, javax.mail.http and javax.activation classes and mails user his login and password at the email address given by him during registration.

Methods inherited from class javax.servlet.http.HttpServlet
`doDelete, doGet, doOptions, doPut, doTrace, getLastModified, service, service`

Methods inherited from class javax.servlet.GenericServlet
`destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, init, init, log, log`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### login1

    public java.lang.String login1

### firstName1

    public java.lang.String firstName1

### lastName1

    public java.lang.String lastName1

### email1

    public java.lang.String email1

### gender1

    public java.lang.String gender1

### address1

    public java.lang.String address1

### city1

    public java.lang.String city1

### day1

    public java.lang.String day1

### month1

    public java.lang.String month1

### year1

    public java.lang.String year1

### repeat

    public boolean repeat

Constructor Detail

### RegisterServlet

    public RegisterServlet()

Method Detail

### doPost

    public void doPost(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws javax.servlet.ServletException,
                       java.io.IOException

  `doGet` - This method uses methods of class QueryEngine to check for repetiton of username and email address. After verifying all data, it registers the user.
  Overrides:
    `doPost` in class `javax.servlet.http.HttpServlet`
  Parameters:
    `HttpServletRequest` - request
    `HttpServletResponse` - response

### generatePassword

    public static java.lang.String generatePassword(java.lang.String login)

  This method generates a random password depending upon the login name which user selects.
  Parameters:
    `String` - login

### mailUserHisPassword

    public static void mailUserHisPassword(java.lang.String[] recipients,
                                           java.lang.String subject,
                                           java.lang.String message,
                                           java.lang.String from)

  This method uses javax.mail, javax.mail.http and javax.activation classes and mails user his login and password at the email address given by him during registration.
  Parameters:
    `String` - recipients[] -- array of String having users email ID.
    `String` - subject -- subject of mail
    `String` - message -- message to be send
    `String` - from -- sender's emails address

### getMonthValue

    public java.lang.String getMonthValue(java.lang.String month)

  This method takes a month name as an arguement and returns the corrosponding month number.
  Parameters:
    `String` - month -- month name

Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD