org.dspace.app.webui.servlet
Class RegisterServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.dspace.app.webui.servlet.DSpaceServlet
              extended by org.dspace.app.webui.servlet.RegisterServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class RegisterServlet
extends DSpaceServlet

Servlet for handling user registration and forgotten passwords.

This servlet handles both forgotten passwords and initial registration of users. Which it handles depends on the initialisation parameter "register" - if it's "true", it is treated as an initial registration and the user is asked to input their personal information.

The sequence of events is this: The user clicks on "register" or "I forgot my password." This servlet then displays the relevant "enter your e-mail" form. An e-mail address is POSTed back, and if this is valid, a token is created and e-mailed, otherwise an error is displayed, with another "enter your e-mail" form.

When the user clicks on the token URL mailed to them, this servlet receives a GET with the token as the parameter "KEY". If this is a valid token, the servlet then displays the "edit profile" or "edit password" screen as appropriate.

See Also:
Serialized Form

Field Summary
static int ENTER_EMAIL_PAGE
          The "enter e-mail" step
static int NEW_PASSWORD_PAGE
          The simple "enter new password" page, for user who's forgotten p/w
static int PERSONAL_INFO_PAGE
          The "enter personal info" page, for a registering user
 
Constructor Summary
RegisterServlet()
           
 
Method Summary
protected  void doDSGet(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Process an incoming HTTP GET.
protected  void doDSPost(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Process an incoming HTTP POST.
 void init()
           
 
Methods inherited from class org.dspace.app.webui.servlet.DSpaceServlet
doGet, doPost
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENTER_EMAIL_PAGE

public static final int ENTER_EMAIL_PAGE
The "enter e-mail" step

See Also:
Constant Field Values

PERSONAL_INFO_PAGE

public static final int PERSONAL_INFO_PAGE
The "enter personal info" page, for a registering user

See Also:
Constant Field Values

NEW_PASSWORD_PAGE

public static final int NEW_PASSWORD_PAGE
The simple "enter new password" page, for user who's forgotten p/w

See Also:
Constant Field Values
Constructor Detail

RegisterServlet

public RegisterServlet()
Method Detail

init

public void init()
Overrides:
init in class javax.servlet.GenericServlet

doDSGet

protected void doDSGet(Context context,
                       javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws javax.servlet.ServletException,
                       IOException,
                       SQLException,
                       AuthorizeException
Description copied from class: DSpaceServlet
Process an incoming HTTP GET. If an exception is thrown, or for some other reason the passed in context is not completed, it will be aborted and any changes made by this method discarded when this method returns.

Overrides:
doDSGet in class DSpaceServlet
Parameters:
context - a DSpace Context object
request - the HTTP request
response - the HTTP response
Throws:
SQLException - if a database error occurs
AuthorizeException - if some authorization error occurs
javax.servlet.ServletException
IOException

doDSPost

protected void doDSPost(Context context,
                        javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response)
                 throws javax.servlet.ServletException,
                        IOException,
                        SQLException,
                        AuthorizeException
Description copied from class: DSpaceServlet
Process an incoming HTTP POST. If an exception is thrown, or for some other reason the passed in context is not completed, it will be aborted and any changes made by this method discarded when this method returns.

Overrides:
doDSPost in class DSpaceServlet
Parameters:
context - a DSpace Context object
request - the HTTP request
response - the HTTP response
Throws:
SQLException - if a database error occurs
AuthorizeException - if some authorization error occurs
javax.servlet.ServletException
IOException


Copyright © 2013 DuraSpace. All Rights Reserved.