public class RegisterServlet extends DSpaceServlet
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.
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
RegisterServlet() |
| Modifier and Type | Method and Description |
|---|---|
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() |
doGet, doPostdoDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, servicepublic static final int ENTER_EMAIL_PAGE
public static final int PERSONAL_INFO_PAGE
public static final int NEW_PASSWORD_PAGE
public void init()
init in class javax.servlet.GenericServletprotected void doDSGet(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException, SQLException, AuthorizeException
DSpaceServletdoDSGet in class DSpaceServletcontext - a DSpace Context objectrequest - the HTTP requestresponse - the HTTP responseSQLException - if a database error occursAuthorizeException - if some authorization error occursjavax.servlet.ServletExceptionIOExceptionprotected void doDSPost(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException, SQLException, AuthorizeException
DSpaceServletdoDSPost in class DSpaceServletcontext - a DSpace Context objectrequest - the HTTP requestresponse - the HTTP responseSQLException - if a database error occursAuthorizeException - if some authorization error occursjavax.servlet.ServletExceptionIOExceptionCopyright © 2016 DuraSpace. All Rights Reserved.