1 18 19 20 package org.apache.struts.action; 21 22 23 import java.util.ArrayList ; 24 25 import org.apache.struts.config.ActionConfig; 26 import org.apache.struts.config.ForwardConfig; 27 28 29 47 48 public class ActionMapping extends ActionConfig { 49 50 51 52 61 public ActionForward findForward(String name) { 62 63 ForwardConfig config = findForwardConfig(name); 64 if (config == null) { 65 config = getModuleConfig().findForwardConfig(name); 66 } 67 return ((ActionForward) config); 68 69 } 70 71 72 77 public String [] findForwards() { 78 79 ArrayList results = new ArrayList (); 80 ForwardConfig fcs[] = findForwardConfigs(); 81 for (int i = 0; i < fcs.length; i++) { 82 results.add(fcs[i].getName()); 83 } 84 return ((String []) results.toArray(new String [results.size()])); 85 86 } 87 88 89 95 public ActionForward getInputForward() { 96 97 if (getModuleConfig().getControllerConfig().getInputForward()) { 98 return (findForward(getInput())); 99 } else { 100 return (new ActionForward(getInput())); 101 } 102 103 } 104 105 106 } 107 | Popular Tags |