hanbit media, inc. 1 1 for early adapters… for next century of world-changing technology ant 와...
TRANSCRIPT
![Page 1: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/1.jpg)
Hanbit Media, Inc. 1 1for early adapters… for next century of world-changing technology
Ant 와 웹 어플리케이션 개발
2003. 5. www.okjsp.pe.kr허광남
![Page 2: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/2.jpg)
Hanbit Media, Inc. 2 2for early adapters… for next century of world-changing technology
Section3
Ant 와 Tomcat
![Page 3: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/3.jpg)
Hanbit Media, Inc. 3 3for early adapters… for next century of world-changing technology
목차
• Tomcat4.1 개요• 웹 어플리케이션 구조• Tomcat Manager 와 Ant• 개발 데모• 정리
![Page 4: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/4.jpg)
Hanbit Media, Inc. 4 4for early adapters… for next century of world-changing technology
Tomcat4.1 개요
• Web Application Server• Servlet Container• JCP Specification Reference Implementa
tion
![Page 5: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/5.jpg)
Hanbit Media, Inc. 5 5for early adapters… for next century of world-changing technology
웹 어플리케이션 구조
• 웹 어플리케이션 표준 디렉토리• 컨텍스트의 이해• 배치 디렉토리 구성• 소스 디렉토리 구성
![Page 6: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/6.jpg)
Hanbit Media, Inc. 6 6for early adapters… for next century of world-changing technology
웹 어플리케이션 표준 디렉토리
• Servlet Spec 2.2• Portability• Maintainability• Scalability
![Page 7: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/7.jpg)
Hanbit Media, Inc. 7 7for early adapters… for next century of world-changing technology
컨텍스트의 이해
• Context is a Web Application• http://okjsp.pe.kr/<context>/<dir>/file.jsp
• webapps/ROOT 예외 Default Context• Context 는 같은 이름의 dir 보다 우선 • 상호 독립• IIS 가상 디렉토리 X
![Page 8: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/8.jpg)
Hanbit Media, Inc. 8 8for early adapters… for next century of world-changing technology
웹 어플리케이션 구조 (2)
<protocol><domain>:<port><ContextName>/<dir> /<file> http:// localhost:8080 /examples /jsp/cal/cal1.jsp
![Page 9: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/9.jpg)
Hanbit Media, Inc. 9 9for early adapters… for next century of world-changing technology
배치 디렉토리 구성
• ContextRoot• / web contents visible• /WEB-INF invisible• /web.xml webapp information • /classes servlets, classes, *.properties
• /lib *.jar
![Page 10: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/10.jpg)
Hanbit Media, Inc. 10
10for early adapters… for next century of world-changing technology
소스 디렉토리 구성 (1)
• docs/ - 웹 어플리케이션의 문서들• src/ - 서블릿 , 빈즈 , 자바 클래스
패키지 체계처럼 디렉토리 구조• web/ - HTML, JSP, JavaScript, CSS 파일 , 이미지
웹 어플리케이션의 문서 루트 document root• web/WEB-INF/ - 웹 어플리케이션 환경설정 파일들 w
eb.xml, *.tld, 다른 자원 파일들클라이언트의 요청에 의해 노출되는 것을 금지
![Page 11: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/11.jpg)
Hanbit Media, Inc. 11
11for early adapters… for next century of world-changing technology
소스 디렉토리 구성 (2)
• 개발 과정에서 , 임시로 생성되는 두개의 디렉토리• build/ - 기본 빌드 (ant) 를 실행할 때 ,
웹 어플리케이션의 정확한 파일 구조 이미지 형성• <CATALINA_HOME>/webapps 디렉토리에 복사 , • "Manager" 웹 어플리케이션을 통해서 설치• 후자는 개발기간 동안 매우 유용
• dist/ - ant dist바이너리 배포판의 정확한 이미지를 생성
![Page 12: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/12.jpg)
Hanbit Media, Inc. 12
12for early adapters… for next century of world-changing technology
Tomcat Manager 와 Ant
• Manager WebApp• Ant 의 Manager Task• Sample
![Page 13: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/13.jpg)
Hanbit Media, Inc. 13
13for early adapters… for next century of world-changing technology
Manager WebApp (1)
• Manager WebApp<CATALINA_HOME>/conf/tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?><tomcat-users> … <role rolename="manager"/> … <user username="admin" password="admin" roles="admin,m
anager"/></tomcat-users>
![Page 14: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/14.jpg)
Hanbit Media, Inc. 14
14for early adapters… for next century of world-changing technology
Manager WebApp (2)
![Page 15: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/15.jpg)
Hanbit Media, Inc. 15
15for early adapters… for next century of world-changing technology
![Page 16: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/16.jpg)
Hanbit Media, Inc. 16
16for early adapters… for next century of world-changing technology
Ant 와 WebApp Task(1)
• clean – /build 청소• compile - /build 에 클래스 생성• all – depends=“clean,compile”• javadoc – api 문서 생성 /dist/docs• dist – war 파일 생성
![Page 17: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/17.jpg)
Hanbit Media, Inc. 17
17for early adapters… for next century of world-changing technology
Ant 와 WebApp Task(2)
• Manager+Ant taskdef<CATALINA_HOME>/server/lib/catalina-ant.jar
• install – /build 디렉토리 붙이기• reload - 서블릿과 자바빈즈 변경적용• remove – 개발 컨텍스트 제거
![Page 18: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/18.jpg)
Hanbit Media, Inc. 18
18for early adapters… for next century of world-changing technology
Sample
• /tomcat-docs webapp sample• 웹 어플리케이션 개발 표준• 기본적인 build.xml• build.properties 이용
![Page 19: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/19.jpg)
Hanbit Media, Inc. 19
19for early adapters… for next century of world-changing technology
개발 데모
• tomcat sample 활용• Eclipse 에서 web 개발환경 구축하기
![Page 20: Hanbit Media, Inc. 1 1 for early adapters… for next century of world-changing technology Ant 와 웹 어플리케이션 개발 2003. 5. 허광남](https://reader036.vdocument.in/reader036/viewer/2022082518/5697bf701a28abf838c7d602/html5/thumbnails/20.jpg)
Hanbit Media, Inc. 20
20for early adapters… for next century of world-changing technology
정리
• Tomcat4.1 개요• 웹 어플리케이션 구조• Tomcat Manager 와 Ant• 개발 데모