Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.webapps.action
Class EmailPasswordAction  view EmailPasswordAction download EmailPasswordAction.java

java.lang.Object
  extended byorg.apache.struts.action.Action
      extended bycom.RuntimeCollective.webapps.action.EmailPasswordAction

public class EmailPasswordAction
extends org.apache.struts.action.Action

Implementation of Action that emails a user's password to them

Version:
$Id: EmailPasswordAction.java,v 1.6 2003/09/30 15:13:08 joe Exp $

Field Summary
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
EmailPasswordAction()
           
 
Method Summary
 org.apache.struts.action.ActionForward perform(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Emails a registered user's password to them, then returns them to the main page.
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmailPasswordAction

public EmailPasswordAction()
Method Detail

perform

public org.apache.struts.action.ActionForward perform(org.apache.struts.action.ActionMapping mapping,
                                                      org.apache.struts.action.ActionForm form,
                                                      javax.servlet.http.HttpServletRequest request,
                                                      javax.servlet.http.HttpServletResponse response)
                                               throws java.io.IOException,
                                                      javax.servlet.ServletException
Emails a registered user's password to them, then returns them to the main page.

If the email address is not found, return them to the 'not found' page, with an appropriate message.

The text for the email is taken from the Messages.properties file, using the two entries:
messages.login.emailDetailsSubject
messages.login.emailDetailsMessage

The following local Forwards are returned:
notFoundEmail - if the email address is not found in the system.
success - if the email is found, and an email dispatched.
failure - an unexpected error occured.

Error messages:
error.db.connection - if it was not possible to connect to the database.