KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > quikj > application > communicator > applications > webtalk > controller > DisplayDeleteFileInputAction


1 /*
2  * DisplayDeleteFileInputAction.java
3  *
4  * Created on June 12, 2003, 9:06 PM
5  */

6
7 package com.quikj.application.communicator.applications.webtalk.controller;
8
9 import java.io.*;
10 import java.util.*;
11 import javax.servlet.*;
12 import javax.servlet.http.*;
13 import org.apache.struts.action.*;
14 import com.quikj.application.communicator.admin.controller.*;
15 import java.sql.*;
16
17 /**
18  *
19  * @author Vinod Batra
20  */

21 public class DisplayDeleteFileInputAction extends Action{
22     
23     /** Creates a new instance of DisplayDeleteFileInputAction */
24     public DisplayDeleteFileInputAction() {
25     }
26     public ActionForward execute(ActionMapping mapping,
27     ActionForm form,
28     HttpServletRequest request,
29     HttpServletResponse response)
30     throws IOException, ServletException {
31         // Extract attributes we will need
32
Locale locale = getLocale(request);
33         ActionErrors errors = new ActionErrors();
34         
35         // first check if the user has a connection
36
Connection c = (Connection)request.getSession().getAttribute("connection");
37         if (c == null) {
38             errors.add(ActionErrors.GLOBAL_ERROR,
39             new ActionError("error.not.logged.in"));
40             saveErrors(request, errors);
41             return mapping.findForward("logon");
42         }
43         
44         WebTalkRelatedTasks menu = new WebTalkRelatedTasks();
45         menu.addLink(new LinkAttribute("Upload File", "upload_file_input"));
46         menu.addLink(new LinkAttribute("Rename File", "rename_file_input"));
47         
48         request.setAttribute("menu", menu);
49         return (new ActionForward(mapping.getInput()));
50     }
51 }
52
Popular Tags