KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > quikj > application > communicator > admin > controller > DisplayChangePasswordAction


1 /*
2  * DisplayChangePasswordAction.java
3  *
4  * Created on May 8, 2003, 5:11 PM
5  */

6
7 package com.quikj.application.communicator.admin.controller;
8
9 import javax.servlet.http.*;
10 import org.apache.struts.action.*;
11 import java.sql.*;
12
13 /**
14  *
15  * @author bhm
16  */

17 public class DisplayChangePasswordAction extends Action
18 {
19     
20     /** Creates a new instance of DisplayChangePasswordAction */
21     public DisplayChangePasswordAction()
22     {
23     }
24     
25     public ActionForward execute(ActionMapping mapping,
26     ActionForm form,
27     HttpServletRequest request,
28     HttpServletResponse response)
29     {
30         ActionErrors errors = new ActionErrors();
31         
32         Connection c = (Connection)request.getSession().getAttribute("connection");
33         if (c == null)
34         {
35             errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.not.logged.in"));
36             saveErrors(request, errors);
37             
38             return mapping.findForward("logon");
39         }
40         
41         return mapping.getInputForward();
42     }
43 }
44
Popular Tags