把pageContext对象传进取即可。

解决方案 »

  1.   

    jsp :
    application.getAttribute();JAVABEAN:
    application.setAttribute();
      

  2.   

    参考下面:
    public final void initialize(PageContext pageContext)
            throws ServletException
        {
            m_application = pageContext.getServletContext();
            m_request = (HttpServletRequest)pageContext.getRequest();
            m_response = (HttpServletResponse)pageContext.getResponse();
        }其中m_application就是你要的