문서의 이전 판입니다!
JBoss EAP 6.x JSP Hot Deploy 설정 방법
디렉토리 방식으로 배포한경우 JSP파일등을 실시간으로 갱신하는 방법에 대해 설명한다.
톰캣의 reloadable=“true” 와 같은 동작을 하는 방법
문제
- JSP의 핫 배포가 잘 작동하지 않습니다.
- JSP를 약간 수정했을 때, 핫 스왑하는 방법은?
- NetBeans에서 JSP를 변경할 때마다 배포 할 수 있습니까?
- JBoss를 다시 시작하지 않고 응용 프로그램을 다시 전개 (JSP 핫 배포) 할 수 있습니까?
해결방법
- EAP 6에서 JSP를 다시 컴파일하려면 development 모드를 활성화하거나 check-interval 을 설정합니다.
- Jasper 컴파일러는 work 디렉토리의 컴파일 된 클래스의 타임 스탬프를 비교하여 다시 컴파일해야하는지 결정합니다. 새로운 JSP의 타임 스탬프가 새는지 확인하십시오. (work 디렉토리의 이전 컴파일 된 클래스보다 최신 타임 스탬프를 확인하십시오. 이전의 JSP 파일보다 타임 스탬프가 새로운 것을 확인하지 않습니다.)
- touch 명령을 사용하여 다시 컴파일 JSP의 타임 스탬프의 업데이트가 용이합니다.
- 다음과 같이 web 서브 시스템 development 를 True로 설정하십시오. 이는 각 요청에서 JSP가 재 컴파일에 대한 확인임을 의미합니다. 그러나 프로덕션 환경과 오버 헤드가 우려되는 경우이를 사용하지 마십시오.
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
<configuration>
<jsp-configuration development="true"/>
</configuration>
- 다음과 같이 CLI를 사용하여도 재 컴파일 할 수 있습니다.
[standalone @ localhost : 9999 /] / subsystem = web / configuration = jsp-configuration : write-attribute (name = development, value = true)
{
"outcome"=> "success",
"response-headers"=> {
" operation-requires-reload "=> true,
"process-state "=>"reload-required "
}
}
- 서브 시스템에 변경이 반영되어 있는지를 표시 할 수 있습니다.
[standalone @ localhost : 9999 /] / subsystem = web / configuration = jsp-configuration : read-resource (recursive = true)
{
"outcome"=> "success",
"result"=> {
"check-interval"=> 0,
"development"=> "true",
"disabled"=> false,
"display-source-fragment"=> true,
"dump-smap"=> false,
"error-on-use-bean-invalid-class -attribute "=> false,
"generate-strings-as-char-arrays "=> false,
"java-encoding "=>"UTF8 ",
"keep-generated "=> true,
"mapped-file "=> true ,
"modification-test-interval"=> 4,
"recompile-on-fail"=> false,
"scratch-dir"=> undefined,
"smap"=> true,
"source-vm"=> "1.5"
"tag-pooling"=> true,
"target-vm"=> "1.5",
"trim-spaces"=> false,
"x-powered-by"=> true
}
}
- 이러한 변화가 얼마나 자주 (초)에서 발생 하는지를 지정하면 check-interval 은 백그라운드 프로세스에서 JSP 재 컴파일 확인을 활성화합니다.
<subsystem xmlns = "urn : jboss : domain : web : 1.1"default-virtual-server = "default-host"native = "false">
<configuration>
<jsp-configuration check-interval = "600"/>
</ configuration>