메뉴 건너뛰기

infra

[JBOSS] standalone

lispro062017.08.13 02:03조회 수 1997댓글 0

    • 글자 크기

standalone 에서 아래와 같이 설정 가능하다.


start

./standalone.sh &

stop

./jboss-admin.sh --connect command=:shutdown



ROOT Directory가 welcome-content일 경우 jsp파일이 compile되지 않음 ROOT Directory를 ROOT.war로 변경해야 jsp파일이 compile 됨 (변경하게 되면 welcome-content에 있는 파일은 'error 404'가 출력됨)


http://heegyu.blogspot.kr/2015/07/centos-6-jboss7-jsp.html


jsp를 자동으로 실행하게 하위 위한 설정은 위를 참고하자.


standalone/configuration/standalone.xml


내용 삽입

<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">

 <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" auto-deploy-exploded="true"/>

</subsystem>



ROOT Directory 변경

vi /opt/jboss-as-7.1.1.Final/standalone/configuration/standalone.xml


내용 삽입 및 변경

<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" 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>


ROOT Directory 생성

mkdir /opt/jboss-as-7.1.1.Final/standalone/deployments/ROOT.war


jboss 서비스 재시작

service jboss restart


jsp test

vi /opt/jboss-as-7.1.1.Final/standalone/deployments/ROOT.war/nowTime.jsp


내용 삽입

<%@ page contentType="text/html; charset=UTF-8"%>

<html>

<head><title>HELLO WORLD</title></head>

<body>

현재 시간: <%= new java.util.Date() %>

</body>

</html>

lispro06 (비회원)
    • 글자 크기
[SSL] IIS 에 쉽게 적용하기 (by lispro06) [GCE] 구글 클라우드 엔진 (by lispro06)

댓글 달기

첨부 (0)
위로