public class InputFileTag extends InputTagSupport
Tag that generates HTML form fields of type <input type="file" ... />. The only functionality provided above and beyond a straight HTML input tag is that the tag will find its enclosing form tag and ensure that the for is set to POST instead of GET, and that the encoding type of the form is properly set to multipart/form-data as both these settings are necessary to correctly perform file uploads.
Does not perform repopulation because default values for <input type="file/> are not allowed by the HTML specification. One can only imagine this is because a malicious page author could steal a user's files by defaulting the value and using JavaScript to auto-submit forms! As a result the tag does not accept a body because it would have no use for any generated content.
errorRenderer, fieldErrorspageContext, parentTagEVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE| Constructor and Description |
|---|
InputFileTag()
Basic constructor that sets the input tag's type attribute to "file".
|
| Modifier and Type | Method and Description |
|---|---|
int |
doEndInputTag()
Writes out a singleton tag representing the values stored on this tag instance.
|
int |
doStartInputTag()
Locates the parent tag and modifies it's method and enctype to be suitable for file upload.
|
String |
getAccept()
Returns the value, if any, set with setAccept().
|
void |
setAccept(String accept)
Sets the content types accepted for files being uploaded.
|
doCatch, doEndTag, doFinally, doStartTag, format, format, getActionBean, getDisabled, getFieldErrors, getFormatPattern, getFormatType, getLocalizedFieldName, getLocalizedFieldName, getName, getOverrideValueOrValues, getParentFormTag, getReadonly, getSingleOverrideValue, getSize, getValidationMetadata, getValueOnPage, hasErrors, isItemSelected, loadErrors, makeFocused, registerWithParentForm, setDisabled, setFocus, setFormatPattern, setFormatType, setName, setReadonly, setSizeevaluateExpression, get, getAccesskey, getAttributes, getBodyContent, getBodyContentAsString, getCssClass, getDir, getId, getLang, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getStyle, getTabindex, getTitle, isXmlTags, release, set, setAccesskey, setBodyContent, setClass, setCssClass, setDir, setDynamicAttribute, setId, setLang, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setStyle, setTabindex, setTitle, toString, writeAttributes, writeCloseTag, writeOpenTag, writeSingletonTaggetActionBeanType, getActionBeanUrl, getPageContext, getParent, getParentTag, getTagStack, popPageContextAttributes, pushPageContextAttributes, setPageContext, setParentpublic InputFileTag()
public void setAccept(String accept)
public String getAccept()
public int doStartInputTag()
throws JspException
doStartInputTag in class InputTagSupportJspException - if the enclosing form tag cannot be locatedpublic int doEndInputTag()
throws JspException
doEndInputTag in class InputTagSupportJspException - if a problem is encountered writing to the JSP page's output© Copyright 2005-2006, Stripes Development Team.