listhandler.java~

来自「J2EE & Tomcat books published by hope」· JAVA~ 代码 · 共 40 行

JAVA~
40
字号
/* */package com.sun.j2ee.workflow.control;import org.impact.stars.control.event.StarsEvent;import org.impact.stars.control.exceptions.StarsEventException;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpSession;import java.util.Enumeration;/* * ListHandler * ----------- * This handler takes all the parameters and their values in the request * object and sets them as attributes in the session object for use by * the list tag handlers. */public class ListHandler extends RequestHandlerSupport {    public StarsEvent processRequest(HttpServletRequest request) throws StarsEventException {    Enumeration paramNames = request.getParameterNames();    HttpSession session = request.getSession();    while (paramNames.hasMoreElements()) {      String paramName = (String) paramNames.nextElement();      session.setAttribute(paramName, request.getParameter(paramName));    }    return null;  }}

⌨️ 快捷键说明

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