<%@ 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>
<%
String aPath1=application.getContextPath();
out.println(aPath1+"<br>"); //프로젝트명만 출력
String aPath2=application.getRealPath("/");
out.println(aPath2); //프로젝트까지의 총 경로 출력
%>
</body>
</html>
'개발하자 > JSP&Servlet' 카테고리의 다른 글
DB연동하기 (0) | 2015.02.25 |
---|---|
URIEncoding-한글깨질때 설정방법 (0) | 2015.02.23 |
getInitParameterNames(),getInitParameter() (0) | 2015.02.23 |
getAttribute,getParameter (0) | 2015.02.23 |
request.getContextPath--절대경로 (0) | 2015.02.23 |