Line | |
---|
1 | package com.medias.megapoli.struts.actions; |
---|
2 | |
---|
3 | import javax.servlet.ServletException; |
---|
4 | import javax.servlet.http.HttpServletRequest; |
---|
5 | import javax.servlet.http.HttpServletResponse; |
---|
6 | |
---|
7 | import org.apache.struts.action.Action; |
---|
8 | import org.apache.struts.action.ActionForm; |
---|
9 | import org.apache.struts.action.ActionForward; |
---|
10 | import org.apache.struts.action.ActionMapping; |
---|
11 | import com.medias.megapoli.struts.forms.DeleteForm; |
---|
12 | |
---|
13 | /** |
---|
14 | * @author combaz |
---|
15 | * |
---|
16 | * Created on 11 mars 2005 |
---|
17 | */ |
---|
18 | public 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.