2013. 8. 16. 09:42


 String path = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+cp;


위에서 각 메서드는


getScheme() → http

getServerName() → localhost

getServerPort() → 9090

getContextPath() → test


처럼 값을 가져오며 아래처럼 출력한다.


http://localhost:9090/test

'JSP > JspServlet' 카테고리의 다른 글

서블릿에서 out.print()  (0) 2013.08.16
tag : core  (0) 2013.08.16
None Annotation 스프링 MVC 예제 (abstract, multiaction)  (0) 2013.07.29
MVC 관련 핸들러 매핑 및 컨트롤러  (0) 2013.07.29
액션 태그와 커스텀 태그  (0) 2013.07.29
Posted by 1+1은?