|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts.action.ActionForm
org.apache.struts.validator.ValidatorForm
org.apache.struts.webapp.upload.UploadForm
public class UploadForm
This class is a placeholder for form values. In a multipart request, files are represented by set and get methods that use the class org.apache.struts.upload.FormFile, an interface with basic methods to retrieve file information. The actual structure of the FormFile is dependant on the underlying impelementation of multipart request handling. The default implementation that struts uses is org.apache.struts.upload.CommonsMultipartRequestHandler.
Field Summary | |
---|---|
protected java.lang.String |
filePath
The file path to write to |
protected java.lang.String |
queryParam
The value of the embedded query string parameter |
protected FormFile |
theFile
The file that the user has uploaded |
protected java.lang.String |
theText
The value of the text the user has sent as form data |
protected boolean |
writeFile
Whether or not to write to a file |
Fields inherited from class org.apache.struts.validator.ValidatorForm |
---|
page, validatorResults |
Fields inherited from class org.apache.struts.action.ActionForm |
---|
multipartRequestHandler, servlet |
Constructor Summary | |
---|---|
UploadForm()
|
Method Summary | |
---|---|
java.lang.String |
getFilePath()
Get the path to write a file to |
java.lang.String |
getQueryParam()
Retrieve the value of the query string parameter |
FormFile |
getTheFile()
Retrieve a representation of the file the user has uploaded |
java.lang.String |
getTheText()
Retrieve the value of the text the user has sent as form data |
boolean |
getWriteFile()
Get whether or not to write to a file |
void |
reset()
|
void |
setFilePath(java.lang.String filePath)
Set the path to write a file to |
void |
setQueryParam(java.lang.String queryParam)
Set the value of the query string parameter |
void |
setTheFile(FormFile theFile)
Set a representation of the file the user has uploaded |
void |
setTheText(java.lang.String theText)
Set the value of the form data text |
void |
setWriteFile(boolean writeFile)
Set whether or not to write to a file |
ActionErrors |
validate(ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
Check to make sure the client hasn't exceeded the maximum allowed upload size inside of this validate method. |
Methods inherited from class org.apache.struts.validator.ValidatorForm |
---|
getPage, getResultValueMap, getValidationKey, getValidatorResults, reset, setPage, setValidatorResults |
Methods inherited from class org.apache.struts.action.ActionForm |
---|
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String theText
protected java.lang.String queryParam
protected boolean writeFile
protected FormFile theFile
protected java.lang.String filePath
Constructor Detail |
---|
public UploadForm()
Method Detail |
---|
public java.lang.String getTheText()
public void setTheText(java.lang.String theText)
public java.lang.String getQueryParam()
public void setQueryParam(java.lang.String queryParam)
public FormFile getTheFile()
public void setTheFile(FormFile theFile)
public void setWriteFile(boolean writeFile)
public boolean getWriteFile()
public void setFilePath(java.lang.String filePath)
public java.lang.String getFilePath()
public void reset()
public ActionErrors validate(ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
validate
in class ValidatorForm
mapping
- The mapping used to select this instancerequest
- The servlet request we are processing
ActionErrors
object that encapsulates any
validation errorsDynaActionForm
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |