본문 바로가기

Information Technology/Spring Framework

WAR (Web Application aRchive)

WAR (Web Application aRchive)

 

WAR 는 Web clients, Web components 외에 다음과 같은 여러 파일들을 포함하고 있다.
    - Server-side utility classes (database beans, shopping carts 등)
    - Static Web content (HTML, image 등)
    - Client-side classes (applets and utility classes)

 

Web components 와 Web content 파일들은 Web resources 라고 불린다.
   
WAR 는 어떤 특정 디렉토리 구조를 가진다. WAR 의 최상위 디렉토리는 해당 application 의 document root 가 된다.
document root 는 JSP pages, client-side classes, static Web Resource 등이 저장되는 곳이다.

 

document root 는 WEB-INF 라는 서브 디렉토리를 포함하고 있다.
WEB-INF 디렉토리는 다음의 파일들과 디렉토리들을 포함하고 있다.
    - web.xml : The Web application deployment descriptor
    - Tag library descriptor
    - classes : A directory that cotains server-side classes (servlets, utility classes, and JavaBeans components)
    - lib : A directory that contains JAR archives of libraires
   


WAR File 생성 방법
    jar cvf archiveName.war .