filter中设置
<dispathcer>REQUEST</dispathcer>
<dispathcer>FORWARD</dispathcer>
让你的过滤器拦截forward请求!

解决方案 »

  1.   

    汗  一楼说的还不够明白么  ?  或者在你的baseAction里面处理
      

  2.   

    public class AllFilter implements Filter{ public void destroy() {
    // TODO Auto-generated method stub

    } public void doFilter(ServletRequest request, ServletResponse response,
    FilterChain chain) throws IOException, ServletException {
     
    HttpServletRequest req = (HttpServletRequest)request;
    HttpServletResponse res = (HttpServletResponse)response;
    if( null != req.getSession().getAttribute("可以使任何对象"))
    {
    //获取当前系统时间
    SimpleDateFormat sdfTime = new SimpleDateFormat("yyyy-MM-dd kk:mm:ss");  
    String nowTime = sdfTime.format(new Date());  
    req.getSession().setAttribute("lastTime", nowTime);
    }
    chain.doFilter(req, res);
    } public void init(FilterConfig filterConfig) throws ServletException {
     

    }}
      

  3.   

    写个filter,在里面进行控制。