참고 : https://issues.jboss.org/browse/AS7-659
       http://blog.beany.co.kr/archives/3672
       http://www.mastertheboss.com/jboss-web/jbosswebserver/how-do-i-reload-dynamically-my-jsp-from-an-ear

JSP Compile 옵션 활성화


1. {JBoss Node}/configuration/standalone-ha.xml 파일을 수정
   Domain 방식일 경우 
{JBoss Node}/domains/master/configuration/domain.xml 파일을 수정.

2. 배포된 서버 profile을 찾아 아래처럼 변경
    
enable-welcome-root : 기본은 true
                                   false로 선언 시 context root 로 접근 시 welcome 페이지를 직접 web.xml 등으로 설정할 수 있다.

<?xml version='1.0' encoding='UTF-8'?> <server xmlns="urn:jboss:domain:1.5">      <profile>
 
        <subsystem xmlns="urn:jboss:domain:web:1.5" default-virtual-server="default-host" instance-id="${jboss.node.name}" native="false">
            <configuration>
                <jsp-configuration development="true" keep-generated="false" check-interval="1" modification-test-interval="1" recompile-on-fail="true" />
            </configuration>
            <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
            <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>
            <virtual-server name="default-host" enable-welcome-root="false">
                <alias name="localhost"/>
                <alias name="example.com"/>
            </virtual-server>
        </subsystem> 
    </profile>

</server> 


Note for JBoss AS 7 users: make sure you have set the development attribute to "true" in your jsp-configuration :

<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
            <configuration>
                <jsp-configuration development="true" keep-generated="false" check-interval="1" modification-test-interval="1" recompile-on-fail="true"/>
            </configuration>
            <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
            <virtual-server name="default-host" enable-welcome-root="true">
                <alias name="localhost"/>
                <alias name="example.com"/>
            </virtual-server>
</subsystem>


WildFly users, on the other hand, need to specify development mode to true in the jsp-config element:

<subsystem xmlns="urn:jboss:domain:undertow:1.1">
    <servlet-container name="default" default-buffer-cache="default" stack-trace-on-error="local-only">
    <jsp-config development="true" check-interval="1" modification-test-interval="1" recompile-on-fail="true"/>
</servlet-container><br></subsystem>


+ Recent posts