"/mydspace/confirm-removal.jsp");
"/mydspace/remove-item.jsp");
    protected void processMainPage(Context context,        HttpServletRequest request,        HttpServletResponse response)        throws ServletException, IOException, SQLException, AuthorizeException    {        String buttonPressed = UIUtil.getSubmitButton(request, "submit_own");            // Get workspace item, if any        WorkspaceItem workspaceItem;        try        {            int wsID = Integer.parseInt(request.getParameter("workspace_id"));            workspaceItem = WorkspaceItem.find(context, wsID);        }        catch (NumberFormatException nfe)        {            workspaceItem = null;        }        // Get workflow item specified, if any        WorkflowItem workflowItem;        try        {            int wfID = Integer.parseInt(request.getParameter("workflow_id"));            workflowItem = WorkflowItem.find(context, wfID);        }        catch (NumberFormatException nfe)        {            workflowItem = null;        }                    // Respond to button press        boolean ok = false;        if (buttonPressed.equals("submit_new"))        {            // New submission: Redirect to submit            response.sendRedirect(response.encodeRedirectURL(                request.getContextPath() + "/submit"));            ok = true;        }        else if (buttonPressed.equals("submit_own"))        {            // Review own submissions            showPreviousSubmissions(context, request, response);            ok = true;        }        else if (buttonPressed.equals("submit_resume"))        {            // User clicked on a "Resume" button for a workspace item.            String wsID = request.getParameter("workspace_id");            response.sendRedirect(response.encodeRedirectURL(                    request.getContextPath() + "/submit?resume=" + wsID));            ok = true;        }        else if (buttonPressed.equals("submit_delete"))        {            // User clicked on a "Remove" button for a workspace item            if (workspaceItem != null)            {                log.info(LogManager.getHeader(context,                    "confirm_removal",                    "workspace_item_id=" + workspaceItem.getID()));                request.setAttribute("workspace.item", workspaceItem);                JSPManager.showJSP(request,                    response,                    "/mydspace/confirm-removal.jsp");            }            else            {                log.warn(LogManager.getHeader(context,                    "integrity_error",                    UIUtil.getRequestLogInfo(request)));                JSPManager.showIntegrityError(request, response);            }            ok = true;        }        else if (buttonPressed.equals("submit_claim"))        {            // User clicked "take task" button on workflow task            if (workflowItem != null)            {                log.info(LogManager.getHeader(context,                    "view_workflow",                    "workflow_id=" + workflowItem.getID()));                request.setAttribute("workflow.item", workflowItem);                JSPManager.showJSP(request,                    response,                    "/mydspace/preview-task.jsp");                ok = true;            }        }        else if (buttonPressed.equals("submit_perform"))        {            // User clicked "Do This Task" button on workflow task            if (workflowItem != null)            {                log.info(LogManager.getHeader(context,                    "view_workflow",                    "workflow_id=" + workflowItem.getID()));                request.setAttribute("workflow.item", workflowItem);                JSPManager.showJSP(request,                    response,                    "/mydspace/perform-task.jsp");                ok = true;            }        }        else if (buttonPressed.equals("submit_return"))        {            // User clicked "Return to pool" button on workflow task            if (workflowItem != null)            {                log.info(LogManager.getHeader(context,                    "unclaim_workflow",                    "workflow_id=" + workflowItem.getID()));                WorkflowManager.unclaim(context,                    workflowItem,                    context.getCurrentUser());                showMainPage(context, request, response);                context.complete();                ok = true;            }        }        if (ok == false)        {            log.warn(LogManager.getHeader(context,                "integrity_error",                UIUtil.getRequestLogInfo(request)));            JSPManager.showIntegrityError(request, response);        }    }