課程
/后端開發(fā)
/Java
/Struts2入門
有沒有人會sevletApi 3種獲取方式啊 教教我??
2016-11-27
源自:Struts2入門 4-11
正在回答
1.ActionContext??? ActionContext context=ActionContext.getContext();?? ?2.實現(xiàn)Servlet***Aware接口 ??? ??? ?ServletRequestAware : 提供HttpServletRequest;? ?? ??? ?ServletResponseAware : 提供HttpServletResponse;? ?? ??? ?ServletContext:提供ServletContext;?? ?3.ServletActionContext?? ??? ?提供了一些靜態(tài)方法來獲取想要的API,其中:?? ??? ??? ?pageContext:getPageContext();?? ??? ??? ?request:getRequest();?? ??? ??? ?response:getResponse();?? ??? ??? ?servletContext:getServletContext()
NullMoneyException 提問者
百度一下全知道
舉報
本教程帶你踏上Struts2學(xué)習(xí)之旅,對Struts2進行更深入講解
2 回答struts2的默認(rèn)方法打開方式是什么?
2 回答學(xué)習(xí)Struts2 的方法
1 回答struts2
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2017-05-09
1.ActionContext??? ActionContext context=ActionContext.getContext();
?? ?2.實現(xiàn)Servlet***Aware接口 ?
?? ??? ?ServletRequestAware : 提供HttpServletRequest;
? ?? ??? ?ServletResponseAware : 提供HttpServletResponse;
? ?? ??? ?ServletContext:提供ServletContext;
?? ?3.ServletActionContext
?? ??? ?提供了一些靜態(tài)方法來獲取想要的API,其中:
?? ??? ??? ?pageContext:getPageContext();
?? ??? ??? ?request:getRequest();
?? ??? ??? ?response:getResponse();
?? ??? ??? ?servletContext:getServletContext()
2016-11-28
百度一下全知道