JSP request (return string) usage example


1. JSP code:

Copy codeThe code is as follows:
Document : index
Created on : 2009-10-4, 12:45:43
Author : lucifer
<%@page contentType=”text/html” pageEncoding=”UTF-8″%>
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″>
<title>JSP Page</title>
get Scheme:
get Protocol:
get Remote Address:
get Remote Host:
get Server Name:
get Server Port:
get Header:
get Method:
get Request’s URL:
get Request URI:
get Request Session ID:

2. Output:
get Scheme: http
get Protocol: HTTP/1.1
get Remote Address: 0:0:0:0:0:0:0:1
get Remote Host: 0:0:0:0:0:0:0:1
get Server Name: localhost
get Server Port: 8084
get Header: Mozilla/5.0 (Windows; U; Windows NT 6.0; zh-CN; rv: Gecko/20090824 Firefox/3.5.3
get Method: GET
get Request’s URL: /Requests.jsp
get Request URI: /TestRequest/Requests.jsp
get Request Session ID: 6EF4EB4A3FE39A15EEBD4D46FBD0BA32

Recommended Today

Please stop using JWT for session management immediately

introduction Recently, it has been found that many web application systems use JWT for session management. The reason is to avoid storing sessions on the server or to pursue independent control. I don’t know that there are huge security risks in using JWT for session management! HTTP session management Let’s talk about HTTP protocol first. […]