source: ether_statistics/service/implementation/com/medias/megapoli/struts/actions/ConfirmDeletionAction.java @ 569

Last change on this file since 569 was 569, checked in by vmipsl, 12 years ago

Nouveau projet

File size: 1.2 KB
Line 
1package com.medias.megapoli.struts.actions;
2
3import javax.servlet.ServletException;
4import javax.servlet.http.HttpServletRequest;
5import javax.servlet.http.HttpServletResponse;
6
7import org.apache.struts.action.Action;
8import org.apache.struts.action.ActionForm;
9import org.apache.struts.action.ActionForward;
10import org.apache.struts.action.ActionMapping;
11import com.medias.megapoli.struts.forms.DeleteForm;
12
13/**
14 * @author combaz
15 *
16 * Created on 11 mars 2005
17 */
18public class ConfirmDeletionAction extends Action {
19        public ActionForward execute (ActionMapping mapping,ActionForm form,
20                        HttpServletRequest request, HttpServletResponse response)
21                throws ServletException {
22                String target = "failure";
23
24                if(form!=null) {
25                        DeleteForm df = (DeleteForm) form;
26                        String path = df.getPath();
27//                      System.out.println ("ComfirmDeletionAction_execute");
28//                      System.out.println("************PATH : "+path+" *****************");
29//                      System.out.println(path.substring(path.indexOf("/")+1));
30                        if((path.substring(path.indexOf("/")+1)).indexOf("/") < 0) {
31                                //il s'agit d'un jeu
32                                target="set";
33                        }
34                        else {
35                                //il s'agit d'un fichier
36                                target="file";
37                        }
38                }
39               
40                return mapping.findForward(target);
41        }
42
43
44}
Note: See TracBrowser for help on using the repository browser.