Version 7 (modified by jazz, 16 years ago) (diff) |
---|
2009-01-21
- 在 WaveMaker 上重新實作 Google Map 範例。
- 本來想直接使用 WaveMaker 本身自帶的 Tomcat 環境,但後來發現縱使把 WAR 檔案放到 ${WaveMaker 安裝路徑}/tomcat/webapps 底下,並不會自行解開。
- WaveMaker 的 Tomcat 原來跟執行 wavemaker.sh 的使用者身分有關。經使用 tomcat manager 管理介面上傳 WAR 檔以後,發現可以正常運作,但一但執行 wavemaker.sh stop 則又會消失不見。如果用 sudo 執行 wavemaker.sh,WAR 會暫存在 /tmp/WM*/webapps
- [參考文件] Apache 及 Tomcat 的結合
- Apache 2 and Tomcat 5.5
oceandb:~# echo "deb http://free.nchc.org.tw/debian lenny main non-free contrib" > /etc/apt/sources.list.d/lenny.list oceandb:~# apt-get install sun-java6-jdk tomcat5.5 tomcat5.5-admin tomcat5.5-webapps libapache2-mod-jk oceandb:~# cat << EOF > /etc/tomcat5.5/tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="admin"/> <role rolename="manager"/> <user username="${YOUR_NAME}" password="${YOUR_PASSWORD}" roles="admin,manager"/> </tomcat-users> EOF
oceandb:~# /etc/init.d/tomcat5.5 restart
- 此外,發現用大寫字母 OID.war 好像會造成問題,反而是 oid.war 就可以。
- 把 WAR 檔放到 /var/lib/tomcat5.5/webapps 底下,如果遇到 "Reload this Page FAIL - Application at context path /${NAME} could not be started"的錯誤訊息,代表要設定 JAVA_HOME 或 JRE_HOME 環境變數。
- 參考解答
- 修改 /etc/default/tomcat5.5
-
/etc/default/tomcat5.5
old new 6 6 # JDK version 1.4. If JAVA_HOME is not set, some common directories for 7 7 # the Sun JDK, various J2SE 1.4 versions, and the free runtimes 8 8 # java-gcj-compat-dev and kaffe are tried. 9 #JAVA_HOME=/usr/lib/jvm/java-6-sun9 JAVA_HOME=/usr/lib/jvm/java-6-sun 10 10 11 11 # Directory for per-instance configuration files and webapps. It contain the 12 12 # directories conf, logs, webapps, work and temp. See RUNNING.txt for details.
-
Attachments (3)
- 09-01-21_sceenshot-1.jpg (393.7 KB) - added by jazz 16 years ago.
- 09-01-21_sceenshot-2.jpg (433.4 KB) - added by jazz 16 years ago.
- 09-01-21_sceenshot-3.jpg (407.1 KB) - added by jazz 16 years ago.
Download all attachments as: .zip