public int doEndTag ( ) throws JspException { HttpServletRequest req = ( HttpServletRequest ) pageContext . getRequest ( ) ; // if we are not handling multipart requests then we can't output the file upload tag and we will // report an error if ( ! InternalUtils . isMultipartHandlingEnabled ( req ) ) { String s = Bundle . getString ( "Tags_FileMultiOff" , null ) ; registerTagError ( s , null ) ; return EVAL_PAGE ; } // Create the state for the input tag. ByRef ref = new ByRef ( ) ; nameHtmlControl ( _state , ref ) ; if ( hasErrors ( ) ) return reportAndExit ( EVAL_PAGE ) ; WriteRenderAppender writer = new WriteRenderAppender ( pageContext ) ; TagRenderingBase br = TagRenderingBase . Factory . getRendering ( TagRenderingBase . INPUT_FILE_TAG , req ) ; br . doStartTag ( writer , _state ) ; if ( ! ref . isNull ( ) ) write ( ( String ) ref . getRef ( ) ) ; localRelease ( ) ; return EVAL_PAGE ; }
Render the FileUpload .