note

JSP 클라이언트 및 서버 정보 본문

JSP/기본

JSP 클라이언트 및 서버 정보

투한 2012. 2. 3. 16:09


<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>클라이언트 및 서버 정보</title>
</head>
<body>
클라이언트 IP = <%=request.getRemoteAddr() %> <br/>
요청 정보 길이 = <%= request.getContentLength() %> <br/>
요청정보 인코딩 = <%= request.getCharacterEncoding() %> <br/>
요청정보 컨텐트 타입= <%=request.getContentType() %> <br/>
요청정보 프로토콜 = <%= request.getProtocol() %> <br/>
요청정보 전송방식 = <%= request.getMethod() %> <br/>
요청 URI = <%= request.getRequestURI() %><br/>
요청 URL = <%= request.getRequestURL() %> <br/>
컨텍스트 경로 = <%= request.getContextPath() %> <br/>
서버 이름 = <%= request.getServerName() %> <br/>
서버 포트 =  <%= request.getServerPort() %> <br/>

</body>
</html>

'JSP > 기본' 카테고리의 다른 글

폼 생성 및 요청 파라미터 출력  (0) 2012.02.03
JSP 기본  (0) 2012.02.03
JSP Calendar 클래스 사용  (0) 2012.02.03
JSP 배열의 내용 출력  (2) 2012.02.03
JSP 메소드 선언 및 호출  (0) 2012.02.03