JspContext jc = getJspContext(); ZMailbox mbox = (ZMailbox) jc.getAttribute(ATTR_ZMAILBOX, PageContext.SESSION_SCOPE); if (mbox == null) { mbox = ZMailbox.getMailbox("user1", AccountBy.name, "test123", "http: jc.setAttribute(ATTR_ZMAILBOX, mbox, PageContext.SESSION_SCOPE);
ZJspSession session = ZJspSession.getSession(getJspContext()); if (session == null ) {  throw new JspException("no session"); } else { return session.getMailbox();
    public ZMailbox getMailbox() throws JspException {         try {            JspContext jc = getJspContext();            ZMailbox mbox = (ZMailbox) jc.getAttribute(ATTR_ZMAILBOX, PageContext.SESSION_SCOPE);            if (mbox == null) {                mbox = ZMailbox.getMailbox("user1", AccountBy.name, "test123", "http://localhost:7070/service/soap/", null);                jc.setAttribute(ATTR_ZMAILBOX, mbox, PageContext.SESSION_SCOPE);            }            return mbox;        } catch (ServiceException e) {            throw new JspException("getMailbox", e);        }    }