91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

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

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

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

乌海市| 建宁县| 本溪市| 阿尔山市| 日照市| 绥江县| 密山市| 方正县| 鄂伦春自治旗| 江永县| 分宜县| 都兰县| 长乐市| 巍山| 蓬莱市| 孝昌县| 黄大仙区| 长海县| 来安县| 黄梅县| 上思县| 北海市| 象州县| 东源县| 广宁县| 义马市| 襄城县| 定襄县| 民丰县| 加查县| 祁东县| 呼伦贝尔市| 张北县| 华阴市| 马山县| 江源县| 华池县| 罗源县| 凤翔县| 金华市| 英超|