doStepJump(context, request, response, subInfo);
doStepJump(context, wrapper, response, subInfo);
    private void processChooseFile(Context context,        HttpServletRequest request,        HttpServletResponse response)        throws ServletException, IOException, SQLException, AuthorizeException    {        File temp = null;        FileUploadRequest wrapper = null;        SubmissionInfo subInfo = null;        boolean ok = false;        String buttonPressed = null;        BitstreamFormat bf = null;        Bitstream b = null;        /*         * To distinguish between an IOException caused by a problem with the         * file upload and one caused by displaying a JSP, we do all the upload         * handling in a try/catch block         */                try        {            // Wrap multipart request to get the submission info            wrapper = new FileUploadRequest(request);            subInfo = getSubmissionInfo(context, wrapper);            buttonPressed = UIUtil.getSubmitButton(wrapper, "submit_next");            if (subInfo != null && buttonPressed.equals("submit_next"))            {                // Create the bitstream                Item item = subInfo.submission.getItem();                temp = wrapper.getFile("file");                if (temp != null)                {                    // Read the temp file into a bitstream                    InputStream is = new BufferedInputStream(                        new FileInputStream(temp));                    b = item.createSingleBitstream(is);                    // Strip all but the last filename.  It would be nice                    // to know which OS the file came from.                    String noPath = wrapper.getFilesystemName("file");                    while (noPath.indexOf('/') > -1)                    {                        noPath = noPath.substring(                                    noPath.indexOf('/') + 1);                    }                    while (noPath.indexOf('\\') > -1)                    {                        noPath = noPath.substring(                                    noPath.indexOf('\\') + 1);                    }                    b.setName(noPath);                    b.setSource(wrapper.getFilesystemName("file"));                    b.setDescription(wrapper.getParameter("description"));                    // Identify the format                    bf = FormatIdentifier.guessFormat(context, b);                    b.setFormat(bf);                    // Update to DB                    b.update();                    item.update();                                        ok = true;                }            }        }        catch (IOException ie)        {            // Problem with uploading            log.warn(LogManager.getHeader(context,                "upload_error",                ""),                ie);        }                if (subInfo == null)        {            // In any event, if we don't have the submission info, the request            // was malformed            log.warn(LogManager.getHeader(context,                "integrity_error",                UIUtil.getRequestLogInfo(request)));        }        else if (buttonPressed.equals("submit_cancel"))        {            doCancellation(request,                response,                subInfo,                SubmitServlet.CHOOSE_FILE,                SubmitServlet.UPLOAD_FILES);        }        else if (buttonPressed.equals("submit_prev"))        {            // Slightly tricky; if the user clicks on "previous,"            // and they haven't uploaded any files yet, the previous            // screen is the edit metadata 2 page.  If there are            // upload files, we go back to the file list page,            // without uploading the file they've specified.            if (subInfo.submission.getItem().getBundles().length > 0)            {                // Have files, go to list                showUploadFileList(request,                    response,                    subInfo,                    false,                    false);            }            else            {                // No files, go back to edit metadata 2                doStep(context, request, response, subInfo, EDIT_METADATA_2);            }        }        else if (buttonPressed.equals("submit_next"))        {            // "Next" pressed - the actual upload was handled above.            if (ok)            {                // Uploaded etc. OK                if (bf != null)                {                    // Format was identified                    showUploadFileList(request, response, subInfo, true, false);                }                else                {                    // Format couldn't be identified                    showGetFileFormat(context, request, response, subInfo, b);                }                context.complete();            }            else            {                // If we get here, there was a problem uploading, but we                // still know which submission we're dealing with                request.setAttribute("submission.info", subInfo);                JSPManager.showJSP(request,                    response,                    "/submit/upload-error.jsp");            }        }        else        {            doStepJump(context, request, response, subInfo);        }	// Remove temp file if it's still around	if (temp != null)	{		temp.delete();	}    }