<%@page contentType="text/html;charset=UTF-8" pageEncoding="ISO-8859-1" session="true"
%><%@page import="com.fujitsu.iflow.model.bpm.BPMSession"
%><%
    request.setCharacterEncoding("UTF-8");request.getParameterNames(); //Need dummy call for WL9.1
    BPMSession bps = (BPMSession) session.getAttribute("BPMSession");
    String goPage = (String)request.getParameter("go");
   
    if (bps != null) {
	try
	{
        bps.logOut();
	}
	catch(Exception ex)
	{
        goPage = "WorkList.jsp";
	}
    }

    if (goPage == null) {
        goPage = "WorkList.jsp";
    }

    session.invalidate();
    if(goPage.indexOf("PlanSummary.jsp") >= 0)
       goPage = goPage.substring(0,goPage.indexOf("PlanSummary.jsp")) + "SortedPlanList.jsp";
    response.sendRedirect(goPage);
%>
