톰캣 자동 디플로이

Posted by Breeze24
2016. 6. 5. 00:32 Unix/WAS
톰캣 자동 디플로이


톰캣을 설치하고 나면, 톰캣 서블릿 설정을 할 것이다. 

톰캣 서블릿 설정하는 방법 바로가기


그 후에 서블릿을 수정하면, 자동으로 디플로이가 되어야 하나, 설치 후 디폴트 옵션으로는 자동 디플로이가 되지 않는다. 

서블릿을 자동 디플로이 하는 방법에 대해 알아보자. 


서블릿 자동 디플로이 설정 방법

C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\Catalina\localhost로 이동한다.

만약 localhost가 없다면, 디렉토리를 생성한 후, ROOT.xml을 생성한다. 



톰캣 자동 디플로이


(localhost는 도메인명이 되고, ROOT.xml은 컨텍스트의 명이 된다. 다를 경우 자신의 환경에 맞게 설정해 주면 된다.)

그리고, ROOT.xml은 아래와 같이 작성한다. 


<?xml version='1.0' encoding='utf-8'?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
 
      http://www.apache.org/licenses/LICENSE-2.0
 
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- The contents of this file will be loaded for each web application -->
<Context reloadable="true" privileged="true">
 
    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
 
    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
    <!--
    <Manager pathname="" />
    -->
 
    <!-- Uncomment this to enable Comet connection tacking (provides events
         on session expiration as well as webapp lifecycle) -->
    <!--
    <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
    -->
 
</Context>
.

설정 방법

간략히 설명을 하면,

reloadable="true" privileged="true" 이렇게 설정하면, 자동으로 서블릿을 디플로이 하게 된다. 



톰캣 reloadable

.

'Unix > WAS' 카테고리의 다른 글

CentOS에서 Crontab 설치하는 방법  (0) 2016.07.23
톰캣 한글 파라미터 깨짐  (0) 2016.06.05
톰캣 서블릿 설정  (0) 2016.06.05
제우스(JEUS)서버 이관하기  (0) 2016.06.05
Putty 한글판 다운로드  (0) 2016.06.05