第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

上一節(jié)要講的訪問Servlet API的例子呢?

不是說用代碼操作實現(xiàn)三種訪問Servlet API的方法嗎,怎么沒講?

正在回答

5 回答

我這有個例子

public class BaseAction extends ActionSupport{

?? ?/**
?? ? * @Fields serialVersionUID
?? ? */
?? ?private static final long serialVersionUID = 1L;

?? ?/**
?? ? *
?? ? * @Description: 獲取Session對象
?? ? * @param 參數(shù)說明
?? ? * @return Map<String,Object> 返回類型
?? ? * @throws 異常說明
?? ? */
?? ?protected Map<String, Object> getSession() {
?? ??? ?ActionContext ctx = ActionContext.getContext();
?? ??? ?return ctx.getSession();
?? ?}

?? ?/**
?? ? *
?? ? * @Description: 獲取HttpServletRequest對象
?? ? * @param 參數(shù)說明
?? ? * @return HttpServletRequest 返回類型
?? ? * @throws 異常說明
?? ? */
?? ?protected HttpServletRequest getRequest() {
?? ??? ?return ServletActionContext.getRequest();
?? ?}

?? ?/**
?? ? *
?? ? * @Description: 獲取HttpServletResponse對象
?? ? * @param 參數(shù)說明
?? ? * @return HttpServletResponse 返回類型
?? ? * @throws 異常說明
?? ? */
?? ?protected HttpServletResponse getResponse() {
?? ??? ?return ServletActionContext.getResponse();
?? ?}
}



0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

weibo_暖暖大太陽qi_0 提問者

非常感謝!
2017-01-01 回復(fù) 有任何疑惑可以回復(fù)我~

說句不該說的,,,你知道什么是serlvet-api嗎。。。0 0

0 回復(fù) 有任何疑惑可以回復(fù)我~

變成蝴蝶飛走了·· ·······

0 回復(fù) 有任何疑惑可以回復(fù)我~

我也感覺好奇怪,突然到順序了

0 回復(fù) 有任何疑惑可以回復(fù)我~

就是通過那三個對象來訪問啊,ActiionContxt,HttpServletContext,還有一個***Mware的那個!

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

weibo_暖暖大太陽qi_0 提問者

我說的是具體的代碼實現(xiàn)過程
2016-03-03 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

上一節(jié)要講的訪問Servlet API的例子呢?

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號