com.opensymphony.webwork.interceptor
Class FileUploadInterceptor
java.lang.Object
com.opensymphony.webwork.interceptor.FileUploadInterceptor
- All Implemented Interfaces:
- com.opensymphony.xwork.interceptor.Interceptor, Serializable
- public class FileUploadInterceptor
- extends Object
- implements com.opensymphony.xwork.interceptor.Interceptor
Interceptor that is based off of MultiPartRequestWrapper
. It adds the following
parameters, where [File Name] is the name given to the file uploaded by the HTML form:
- [File Name] : File - the actual File
- [File Name]ContentType : String - the content type of the file
- [File Name]FileName : String - the actual name of the file uploaded (not the HTML name)
You can get access to these files by merely providing setters in your action that correspond to any
of the three patterns above, such as setDocument(File document), setDocumentContentType(String contentType), etc.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.apache.commons.logging.Log log
maximumSize
protected Long maximumSize
allowedTypes
protected String allowedTypes
disallowedTypes
protected String disallowedTypes
FileUploadInterceptor
public FileUploadInterceptor()
setAllowedTypes
public void setAllowedTypes(String allowedTypes)
setDisallowedTypes
public void setDisallowedTypes(String disallowedTypes)
setMaximumSize
public void setMaximumSize(Long maximumSize)
destroy
public void destroy()
- Specified by:
destroy
in interface com.opensymphony.xwork.interceptor.Interceptor
init
public void init()
- Specified by:
init
in interface com.opensymphony.xwork.interceptor.Interceptor
intercept
public String intercept(com.opensymphony.xwork.ActionInvocation invocation)
throws Exception
- Specified by:
intercept
in interface com.opensymphony.xwork.interceptor.Interceptor
- Throws:
Exception