protected String getFilename ( HttpServletRequest request , HttpServletResponse response ) throws IOException { final String filename = request . getParameter ( "filename" ) ; if ( filename == null || filename . length ( ) == 0 ) { throw new IOException ( "Invalid filename" ) ; } return filename ; }
Get filename from the request