logoutbean.java

来自「招标投标网上系统」· Java 代码 · 共 64 行

JAVA
64
字号
/*
 * @(#)LogoutBean.java
 *
 * Copyright 2003 by SYNTC, All rights reserved.
 *
 * This software is the confidential and proprietary information of SYNTC.
 * ("Confidential Information").
 */
package cn.com.syntc.webapp.business;

import javax.servlet.*;
import javax.servlet.http.*;

import cn.com.syntc.common.action.*;
import cn.com.syntc.common.io.*;
import cn.com.syntc.common.util.*;
import cn.com.syntc.common.type.*;
import cn.com.syntc.webapp.session.UserSession;

/**
 * 进行注销的业务逻辑处理的例子<br>
 * @author wang yong
 * @version 1.0
 */
public class LogoutBean extends BusinessLogic
{
  /**
   * 构造函数
   */
  public LogoutBean()
  {
    System.out.println("FrameWork:业务处理类实例化完成【" + this.getClass().getName() + "】");
  }

  /**
   * 业务逻辑处理机能
   */
  public void execute(HttpServletRequest request, HttpServletResponse response, Parameters parameters) throws CommonException
  {
    String forwardPage = "/login.jsp";
    try
    {
      request.getSession().removeAttribute("UserSession");

      forwardPage = "/login.jsp";

      parameters.setParameters("results", "ForwardPage", forwardPage);
    }
    catch(Exception ex)
    {
      forwardPage = "/error.jsp";;
    }
  }

  /**
   * 页面表单检测处理机能
   */
  public void validate(HttpServletRequest request, HttpServletResponse response, Parameters parameters) throws CommonException
  {

  }

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?