정미나닷컴

[JSP] WebLogic + Apache 연동 본문

IT

[JSP] WebLogic + Apache 연동

정미나 2010. 3. 9. 21:15

1.WebLogic 설치
http://www.oracle.com/technology/software/products/ias/htdocs/wls_main.html

 
2.WebLogic 설정
 
2-1. User Projects 생성
시작 > 모든프로그램 > Oracle WebLogic > WebLogic Server 11gR1 > Tools > Configuration Wizard
 
2-2. StartAdminServer for Weblogic Server Domain
 
2-3.
C:\Oracle\Middleware\wlserver_10.3\server\plugin\win\32\mod_wl_22.so 파일을
C:\Program Files\Apache Software Foundation\Apache2.2\modules\mod_wl_22.so 에 복사

 
3.Apache 설정
 
C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf 에 추가


--------------------------------------------------------------------------------
LoadModule weblogic_module modules/mod_wl_22.so
 
<Location /weblogic>
SetHandler weblogic-handler
PathTrim /weblogic
</Location>
 
<IfModule mod_weblogic.c>
WebLogicHost localhost
WebLogicPort 7001
#WebLogicCluster 127.0.0.1:7001,127.0.0.2:7001
ConnectTimeoutSecs 20
ConnectRetrySecs 5
MatchE-pression *.jsp
MatchE-pression *.do
MatchE-pression *Servlet
</IfModule>

--------------------------------------------------------------------------------


4.디렉토리 생성
 
/WEB-INF/classes 디렉토리 생성
/WEB-INF/lib 디렉토리 생성
/WEB-INF/src 디렉토리 생성
/WEB-INF/weblogic.xml 생성
/WEB-INF/web.xml 생성
 
weblogic.xml

--------------------------------------------------------------------------------
<?xml version="1.0" ENCODING="UTF-8"?>
  <!DOCTYPE weblogic-web-app
    PUBLIC "-//BEA Systems, Inc.//DTD Web Application 7.0//EN"
    "http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd" >
<weblogic-web-app>
<context-root>/</context-root>
</weblogic-web-app>
--------------------------------------------------------------------------------


web.xml

--------------------------------------------------------------------------------
<?xml version="1.0" ENCODING="UTF-8" ?>
 <!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
</web-app>
--------------------------------------------------------------------------------


5.Deployments

http://localhost:7001/console
Deployments > install
생성한 디렉토리를 Deployments
 
설치확인
http://localhost:7001/index.html
http://localhost:7001/index.jsp