亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Jsp 中Request怎么使用

發布時間:2021-11-03 17:39:23 來源:億速云 閱讀:167 作者:小新 欄目:編程語言

這篇文章將為大家詳細講解有關Jsp 中Request怎么使用,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。

jsp中request對象的變量列表

<%
out.println("Protocol: " + request.getProtocol() + "
");
out.println("Server Info: " + getServletConfig().getServletContext().getServerInfo() + "
");
out.println("Remote Addr: " + request.getRemoteAddr() + "
");
out.println("Remote Host: " + request.getRemoteHost() + "
");
out.println("Character Encoding: " + request.getCharacterEncoding() + "
");
out.println("Content Length: " + request.getContentLength() + "
");
out.println("Content Type: "+ request.getContentType() + "
");
out.println("Auth Type: " + request.getAuthType() + "
");
out.println("HTTP Method: " + request.getMethod() + "
");
out.println("Path Info: " + request.getPathInfo() + "
");
out.println("Path Trans: " + request.getPathTranslated() + "
");
out.println("Query String: " + request.getQueryString() + "
");
out.println("Remote User: " + request.getRemoteUser() + "
");
out.println("Session Id: " + request.getRequestedSessionId() + "
");
out.println("Request URI: " + request.getRequestURI() + "
");
out.println("Servlet Path: " + request.getServletPath() + "
");
out.println("Accept: " + request.getHeader("Accept") + "
");
out.println("Host: " + request.getHeader("Host") + "
");      
out.println("Referer : " + request.getHeader("Referer") + "
");      
out.println("Accept-Language : " + request.getHeader("Accept-Language") + "
");      
out.println("Accept-Encoding : " + request.getHeader("Accept-Encoding") + "
");      
out.println("User-Agent : " + request.getHeader("User-Agent") + "
");      
out.println("Connection : " + request.getHeader("Connection") + "
");      
out.println("Cookie : " + request.getHeader("Cookie") + "
");      
out.println("Created : " + session.getCreationTime() + "
");      
out.println("LastAccessed : " + session.getLastAccessedTime() + "
");      
out.println("Scheme: " + request.getScheme() + "
");
out.println("Server Name: " + request.getServerName() + "
" );
out.println("Server Port: " + request.getServerPort() + "
");
out.println("Protocol: " + request.getProtocol() + "
");
       
%>

運行結果:

Protocol: HTTP/1.1
Server Info: JavaServer Web Dev Kit/1.0 EA (JSP 1.0; Servlet 2.1; Java 1.2; Windows NT 5.0 x86; java.vendor=Sun Microsystems Inc.)
Remote Addr: 192.168.0.106
Remote Host: abc
Character Encoding: null
Content Length: -1
Content Type: null
Auth Type: null
HTTP Method: GET
Path Info: null
Path Trans: null
Query String: null
Remote User: null
Session Id: To1010mC466113890241879At
Request URI: /c.jsp
Servlet Path: /c.jsp
Accept: */*
Host: 192.168.0.1:8080
Referer : n
Scheme: http
Server Name: 192.168.0.1
Server Port: 8080
Protocol: HTTP/1.1

關于“Jsp 中Request怎么使用”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,使各位可以學到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

洪洞县| 苏尼特左旗| 洪泽县| 三穗县| 明水县| 嘉荫县| 全州县| 印江| 金山区| 深圳市| 吉木萨尔县| 伊宁县| 庆阳市| 丽水市| 韶关市| 探索| 察哈| 桃江县| 鲁甸县| 五峰| 凤翔县| 英山县| 荣昌县| 临沧市| 夹江县| 嘉兴市| 汽车| 常德市| 阳高县| 久治县| 岳西县| 贡嘎县| 奉节县| 吐鲁番市| 剑阁县| 饶阳县| 双流县| 贵南县| 三河市| 永丰县| 泌阳县|