resin4 簡單學習


 

1.        Resin 4.0.26

Resin是CAUCHO公司的產品,是一個非常流行的application server,對servlet和JSP提供了良好的支持,性能也比較優良,resin自身采用JAVA語言開發。

2.        下載地址

http://www.caucho.com/download/

一同下載pdf文件,安裝參考。

 

3.        安裝

參考 文件 Resin-4.0-admin.pdf 。我以Windows為例。

前提,安裝了JDK1.6或者更新版本。

首先添加環境變量RESIN_HOME ,其值為resin 的解壓路徑,比如:D:\Elan\resin4.0.26

4.        啟動方式1

雙擊resin.exe 出現控制台界面:

 

此時瀏覽器中輸入:http://localhost:8080/  頁面如下表示安裝成功:

 

5.        啟動方式2

雙擊 bin/start.bat 窗口會閃過。輸入http://localhost:8080/ 也可查看。

停止時,需要雙擊stop.bat

6.        設置為系統服務

不好意思我還木有研究出來

7.        修改端口

打開conf/resin.properties 文件,找到

# Set HTTP and HTTPS ports

http : 8080

# https : 8443

 

修改8080為你定義的端口

8.        關於resin.properties

# resin.properties - configuration variable values

#

# See resin.xml, cluster-default.xml, and health.xml for full configuration.

# Any variable defined by ${...} can be set as a property in this file.

 

有這段話可以看出,本文件是對其它文件中用到的參數的設置

9.        部署應用

修改conf/resin.xml 文件,找到如下代碼,並列加入你需要部署的app路徑。

      <web-app id="/" root-directory="webapps/ROOT"/>



<resin:if test="${resin_doc}">

<web-app id="/resin-doc" root-directory="${resin.root}/doc/resin-doc"/>

</resin:if>

 

比如下面代碼,ssh為我加的。id表示上下文路徑,后面的root-directory為應用路徑。當然你可以直接將應用放到webapps目錄下,和tomcat一樣的。

<host id="" root-directory=".">

<!--

- webapps can be overridden/extended in the resin.xml

-->

<web-app id="/" root-directory="webapps/ROOT"/>



<resin:if test="${resin_doc}">

<web-app id="/resin-doc" root-directory="${resin.root}/doc/resin-doc"/>

</resin:if>



<web-app id="/ssh" root-directory="D:/Elan/EclipseWork-ssh/ssh/WebRoot"/>



</host>

 

今天就研究了這么一點點,網上關於resin4的資料簡直是太少了。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM