?? contextpvd.java
字號(hào):
package com.ponyjava.common.struts2;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;
public interface ContextPvd {
/**
* 獲得系統(tǒng)絕對(duì)路徑 如:F:\webapps\CmsSys
*
* @param path
* 可以傳入空串
* @return
*/
public String getAppRealPath(String path);
/**
* 獲得應(yīng)用絕對(duì)根路徑
*
* @return
*/
public String getAppRoot();
/**
* 獲得系統(tǒng)根路徑 如:/CmsSys
*
* @return
*/
public String getAppCxtPath();
/**
* 獲得應(yīng)用端口號(hào)
*
* @return
*/
public int getServerPort();
/**
* 注銷(xiāo)
*
* @return
*/
public void logout();
/**
* 獲得response
*
* @return
*/
public HttpServletResponse getResponse();
/**
* 從Request的Attribute中獲取值
*
* @param key
* @return
*/
public Object getRequestAttr(String key);
/**
* 給Request的Attribute中賦值
*
* @param key
* @param value
*/
public void setRequestAttr(String key, Object value);
/**
* 從SESSION中獲得值
*
* @param key
* @return
*/
public Object getSessionAttr(String key);
/**
* 給session賦值
*
* @param key
* @param value
*/
public void setSessionAttr(String key, Object value);
/**
* 移除session中的屬性
*
* @param key
*/
public void removeAttribute(String key);
public Object getApplicationAttr(String key);
public void setApplicationAttr(String key, Object value);
/**
* 獲得sessionId
*
* @param isCreate
* 如果session不存在是否創(chuàng)建
* @return
*/
public String getSessionId(boolean isCreate);
/**
* 獲得訪問(wèn)者IP
*
* @return
*/
public String getRemoteIp();
/**
* 獲得訪問(wèn)者PORT
*
* @return
*/
public int getRemotePort();
/**
* 獲得訪問(wèn)者URL
*
* @return
*/
public String getRequestURL();
/**
* 獲得訪問(wèn)者瀏覽器
*
* @return
*/
public String getRequestBrowser();
/**
* 獲得訪問(wèn)者操作系統(tǒng)
*
* @return
*/
public String getRequestOs();
/**
* 獲得訪問(wèn)者的代理全部信息
*
* @return
*/
public String getRequestUserAgent();
/**
* 添加cookie
*
* @param cookie
*/
public void addCookie(Cookie cookie);
/**
* 獲取cookie
*
* @param name
* @return
*/
public Cookie getCookie(String name);
/**
* 是否是post請(qǐng)求
*
* @return
*/
public boolean isMethodPost();
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -