刚入职的公司用的后台服务器是resin,故所以学习记录一下。java
resin是一个很是流行的web引用服务器,对servlet和jsp提供了良好的支持,自身采用java开发。resin分为普通版和专业版,主要区别是专业版支持缓存和负载均衡。git
官方下载地址:http://caucho.com/products/re...。因为是在windows上运行,笔者下载的是zip版本的,直接解压,运行根目录下的resin.exe就能够启动了,提供了界面来进行启停操做。启动成功后访问http://localhost:8080/,就会出现resin的主页,显示Resin® Default Home Page,和tomcat同样,将项目文件或者war包丢进webapps下面就能够访问了。resin的配置文件在conf文件夹下,在resin.xml中能够发布本身的工程,好比:github
<!-- 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="webapps/ROOT"/> <!-- 发布本身的工程:learnSpringMVC,至关于tomcat的context配置 --> <web-app id="/test" root-directory="webapps/learnSpringMVC"/> </host>
而后就能够经过访:http://localhost:8080/test/,访问本身的项目了。在本项目中,实际访问的是learnSpringMVC下面的index.jsp。在webapp下发布了本身的工程,就能够经过本身的自定义头路径访问发布的接口了,好比以前没有配置web-app时,访问接口:http://localhost:8080/learnSpringMVC/hello/showdemo,配置完后应该访问:http://localhost:8080/test/hello/showdemo。learnSpringMVC项目地址:https://github.com/WangJun-SC...。web
以前接触到的项目都是使用Tomcat做为服务器,到底resin和tomcat的区别是什么呢?为何如今的项目使用resin,经过查询资料总结整理一下。windows
参考: