* Programming/WEB
기본 내장객체
고경a
2016. 9. 8. 19:31
* 기본 내장객체
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <%@ page language="java" contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%> <!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=EUC-KR"> <title>Insert title here</title> </head> <body> <h1>기본 내장객체</h1> <% //HttpServletRequest req = request; String addr = request.getRemoteAddr(); out.print("접근자 주소:"+ addr+"<br>"); out.print("서버 프로토콜:"+ request.getProtocol()+"<br>"); out.print("서버 컨텍스트 경로:"+ request.getContextPath()+"<br>"); out.print("페이지 경로:"+ request.getRequestURI()+"<br>"); out.print("서버명 :"+ request.getServerName()+"<br>"); out.print("서버포트 번호:"+ request.getServerPort()+"<br>"); %> </body> </html> | cs |