在struts2中取application範圍內的變量

假設變量名是reportUrl,則有兩種方法:get 我本身用的是ServletActionContext.getServletContext().getAttribute("reportUrl").toString(),這種是肯定的io 同事說還有一種方法,但我沒有驗證過,ActionContext.getContext().getApplication().get("reportUrl")變量
相關文章
相關標籤/搜索