KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > nextime > ion > backoffice > action > content > MyWorkAction


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