JSP/2012.04강의(MySQL)
1일차 request 기본 객체
Bohemian life
2012. 5. 21. 14:30
<%@ 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> <style> /* 주석: *은 문서 전체에 css스타일을 적용하기 */ *{font-size: 15px; color:blue; font-family: serif; font-style: italic; text-align: center;} /* li태그에 css스타일을 적용하기 :조건 h+ over 에서의 스타일 적용하기 */ li:hover{ font-size:20px; color:black; background-color:yellow;} /* div태그에만 적용하겠다. */ div{ color:navy; font-size: 30px; background-color: #dd3355;} </style> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>request 기본 객체</title> </head> <body> <ul> <li> <div> 클라이언트 IP = <%=request.getRemoteAddr() %> </div> </li> <li>요청정보길이 = <%=request.getContentLength() %> </li> <li>요청정보 인코딩 = <%=request.getContentType() %> </li> <li>요청정보 프로토콜 = <%=request.getProtocol() %> </li> <li>요청정보 전송방식 = <%=request.getMethod() %> </li> <li>요청 URI = <%=request.getRequestURI() %> </li> <li>컨텍스트 경로= <%=request.getContextPath() %> </li> <li>서버이름 = <%=request.getServerName() %> </li> <li>서버포트 = <%=request.getServerPort() %> </li> <ul/> </body> </html>