西沙璞玉
          愛不容易
          posts - 0,comments - 4,trackbacks - 0
          本文大部分內(nèi)容是對(duì)官網(wǎng)的翻譯,及自己配置后的一些體會(huì)。
           一、  基于win  ,resin基本安裝
          1,安裝jdk1.6或更高版本
          2,配置環(huán)境變量JAVA-HOME  ,RESIN-HOME
          3,配置classpath %RESIN-HOME%\lib\resin.jar (如果是win7的話沒必要設(shè)置)
           否則報(bào)異常:com.caucho.loader.SystemClassLoader

          4,解壓resin-4.0.25
          5, 點(diǎn)擊resin.exe運(yùn)行,或者進(jìn)入cmd中 java -jar  d:/resin-4.0.25/lib/resin.jar   start
          6,輸入http://localhost:8080看到resin的管理頁面。

          二,在resin.xml里發(fā)布自己的工程
          我的項(xiàng)目名字為hello2
          1,把工程war文件,或者工程文件夾直接放入webapps文件夾中
           <web-app id="/" root-directory="webapps/hello2"/>(原來這里是“webapps/Root”)
          這樣就能在瀏覽器里看到自己的工程了。
          2,把工程war文件,或者工程文件夾隨便放到哪個(gè)目錄
          同樣工程名為hello2:

           <host-default>
                <!-- creates the webapps directory for .war expansion (據(jù)說這個(gè)是war發(fā)布用的,可以把下面這段刪除!)-->
                <web-app-deploy path="D:/test/webapps"
                                expand-preserve-fileset="WEB-INF/work/**"
                         <!--  multiversion-routing="${webapp_multiversion_routing}" 這時(shí)這句話刪除,有興趣的可以去讀官方文檔,我也不知道原因-->
                   />       
              </host-default>

              <!-- auto virtual host deployment in hosts/foo.example.com/webapps -->
              <host-deploy path="hosts"/>

              <!-- the default host, matching any host name -->
              <host id="" root-directory=".">
                <!--
                   - webapps can be overridden/extended in the resin.xml
                  -->
                <web-app id="/" root-directory="D:/test/webapps/hello2"/>
          只改以上兩處,就能達(dá)到效果
               

          三 ,在resin.xml中配置數(shù)據(jù)庫連接池

          1,添加相應(yīng)的數(shù)據(jù)庫驅(qū)動(dòng)jar包,到resin/lib目錄
          下面是sqlserver的配置
            <database jndi-name='jdbc/hello2'>
                <driver type="com.microsoft.sqlserver.jdbc.SQLServerDriver">
                    <url>jdbc:sqlserver://192.168.2.186:1433;DatabaseName=hello2</url>
                    <user>hndoc</user>
                   <password>hndoc123</password>
                </driver>
               <prepared-statement-cache-size>8</prepared-statement-cache-size>
                      <max-connections>500</max-connections>
                      <max-idle-time>30s</max-idle-time>

            </database>
          下面是mysql的配置:

          <database jndi-name='jdbc/test_mysql'>
            <driver type="com.mysql.jdbc.Driver">
              <url>jdbc:mysql://localhost:3306/test</url>
              <user></user>
              <password></password>
            </driver>
          </database>
          下一篇將介紹如何在eclipse里面用resin進(jìn)行開發(fā)調(diào)試

          posted on 2012-03-21 13:40 @趙 閱讀(11100) 評(píng)論(1)  編輯  收藏

          FeedBack:
          # re: resin4.0.25 安裝配置 及結(jié)合eclipse開發(fā)
          2014-05-30 11:53 | resin
          這個(gè)網(wǎng)站講解resin編譯過程,講的還是很詳細(xì)的:http://strutshome.com/  回復(fù)  更多評(píng)論
            

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          哥哥最近不是很忙
          主站蜘蛛池模板: 舞阳县| 太白县| 彰武县| 壤塘县| 金川县| 盘山县| 临沧市| 正镶白旗| 华池县| 登封市| 灵山县| 上思县| 楚雄市| 景洪市| 潞西市| 乐业县| 云梦县| 灵璧县| 浠水县| 崇义县| 汤阴县| 乐业县| 时尚| 兰州市| 湖北省| 阿尔山市| 仁布县| 密山市| 大竹县| 海宁市| 蓬安县| 嘉定区| 崇阳县| 昭苏县| 彩票| 河北省| 龙口市| 叙永县| 武安市| 彰武县| 介休市|