KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > nextime > ion > backoffice > action > resource > ResourceMenuAction


1 package org.nextime.ion.backoffice.action.resource;
2
3
4 import java.io.IOException JavaDoc;
5
6 import javax.servlet.ServletException JavaDoc;
7 import javax.servlet.http.HttpServletRequest JavaDoc;
8 import javax.servlet.http.HttpServletResponse JavaDoc;
9 import org.apache.struts.action.ActionForm;
10 import org.apache.struts.action.ActionForward;
11 import org.apache.struts.action.ActionMapping;
12 import org.nextime.ion.backoffice.action.BaseAction;
13 import org.nextime.ion.backoffice.bean.Resources;
14
15
16
17 public class ResourceMenuAction extends BaseAction {
18
19     public ActionForward perform(ActionMapping mapping,
20                                  ActionForm form,
21                                  HttpServletRequest JavaDoc request,
22                                  HttpServletResponse JavaDoc response)
23         throws IOException JavaDoc, ServletException JavaDoc {
24             
25         // check if user is correctly logged
26
checkUser(request);
27         
28         // set resources directory
29
try {
30             request.setAttribute("resources",Resources.getResourceXmlBeans(servlet));
31         }
32         catch( Exception JavaDoc e ) {
33             e.printStackTrace();
34         }
35         
36         // Forward to the next page
37
return (mapping.findForward("view"));
38
39     }
40
41 }
42
Popular Tags