1 18 19 20 package org.apache.struts.action; 21 22 23 import java.io.Serializable ; 24 import javax.servlet.ServletRequest ; 25 import javax.servlet.http.HttpServletRequest ; 26 27 import org.apache.struts.upload.MultipartRequestHandler; 28 29 30 60 61 public abstract class ActionForm implements Serializable { 62 63 64 66 67 70 protected transient ActionServlet servlet = null; 71 72 73 77 protected transient MultipartRequestHandler multipartRequestHandler; 78 79 80 82 83 86 protected ActionServlet getServlet() { 87 88 return (this.servlet); 89 90 } 91 92 93 100 public ActionServletWrapper getServletWrapper() { 101 102 return new ActionServletWrapper(getServlet()); 103 104 } 105 106 107 118 public MultipartRequestHandler getMultipartRequestHandler() { 119 return multipartRequestHandler; 120 } 121 122 123 130 public void setServlet(ActionServlet servlet) { 131 132 this.servlet = servlet; 133 135 } 136 137 138 143 public void setMultipartRequestHandler(MultipartRequestHandler multipartRequestHandler) { 144 145 this.multipartRequestHandler = multipartRequestHandler; 146 147 } 148 149 151 152 162 public void reset(ActionMapping mapping, ServletRequest request) { 163 164 try { 165 reset(mapping, (HttpServletRequest ) request); 166 } catch (ClassCastException e) { 167 ; } 169 170 } 171 172 173 199 public void reset(ActionMapping mapping, HttpServletRequest request) { 200 201 ; 203 } 204 205 206 219 public ActionErrors validate(ActionMapping mapping, 220 ServletRequest request) { 221 222 try { 223 return (validate(mapping, (HttpServletRequest ) request)); 224 } catch (ClassCastException e) { 225 return (null); 226 } 227 228 } 229 230 231 247 public ActionErrors validate(ActionMapping mapping, 248 HttpServletRequest request) { 249 250 return (null); 251 252 } 253 254 255 } 256 | Popular Tags |