1. return session instance, public HttpSession getSession () {try {return request. getSession () ;}catch (Exception e) {return null ;}} 2. return absolute path, public String getRealPath () {return request. getSession (). getServletContext (). getRealPath ("/");} 3.get remote server's IPpublic String getRemoteAddr () {if ("127.0.0.1" = (request. getRemoteAddr () | "127.0.0.1 ". equals (request. getRemoteAddr () {retu Rn CommonFun. fetchLocIp ();} else {return request. getRemoteAddr () ;}} 4. get remote server's portpublic Integer getRemotePort () {return request. getRemotePort ();} 5. get sessionIdpublic String getSessionId () {// if sessionId is not empty, if (null! = SessionId & (sessionId. length ()> 0) {return sessionId;} try {// obtain sessionIDjava based on user cookies. util. map <String, String> cookieMap = CookieUtil. parseCookie (request, "CmsCookie"); if (null = cookieMap) {return null;} sessionId = cookieMap. get ("sessionId"); log. debug ("now sessionId is & =" + sessionId);} catch (RuntimeException e) {log. error ("BaseAction: getLoginUserInfo: exception occurred when retrieving the current session ID", e); throw e;} return sessionId; // return}