본문 바로가기
백엔드/WAS

톰캣에서 애플리케이션 두번 디플로이 되는 현상

by david100gom 2019. 7. 29.
728x90

 

중복(두번) 디플로이가 되어 스케줄러가 두번 구동되거나, 로그가 중복으로 찍히는 현상 또는 애플리케이션이 두번 구동되는 현상의 원인

1. web.xml 의 ContextContextLoaderListener 과 DispatcherServlet 에서 같은 설정 파일(*.xml) 을 로딩되도록 설정되어 있을때
2. Tomcat server.xml 파일 내용중 Host 의 appBase 와 Context 의 docbase 의 경로가 동일하거나, appBase 경로에 docBase 경로가 포함될때

 

참고 : https://tomcat.apache.org/tomcat-8.5-doc/config/host.html

Automatic Application Deployment

......

When using automatic deployment, the docBase defined by an XML Context file should be outside of the appBase directory. If this is not the case, difficulties may be experienced deploying the web application or the application may be deployed twice. The deployIgnore attribute can be used to avoid this situation.

Note that if you are defining contexts explicitly in server.xml, you should probably turn off automatic application deployment or specify deployIgnore carefully. Otherwise, the web applications will each be deployed twice, and that may cause problems for the applications.

There are many possible combinations of settings, new files, changed files and deleted files. A separate page describes the expected behaviour of the automatic deployment process in many of these scenarios.

 

 

 

 

728x90

'백엔드 > WAS' 카테고리의 다른 글

아파치+톰캣 SSL 환경 구축  (0) 2019.09.15
Apache + Tomcat 연동 맛보기  (0) 2019.03.12
Apache cache  (0) 2015.06.21
Squid Proxy Server  (0) 2015.06.21
JBoss AS7 시작하기  (2) 2013.02.13
아파치 구동에러  (2) 2010.02.09
Tomcat 구동시 및 중지시 apr 관련 경고 메세지 없애기.  (0) 2009.10.23
JBoss 에서 큐브리드 맛보기  (1) 2009.07.31

댓글