轻松搭建resin开发平台--Resin配置详解

轻松搭建resin开发平台--Resin配置详解
Caucho Resin提供了最快的jsp/servlets运行平台。它支持Servlet,XSL Filtering6并且具备XSLT和XPath1.0引擎。为方便开发人员能更方便的搭建一个易用的开发平台,将Resin的配置案例如下:

本文resin采用版本为: Resin 2.1.13
本文所有代码均已测试通过

我的工程目录结构如下:

/(root)
    |--resin(resin根目录)
    |        |--bin
    |        |--conf
    |        |      |--resin.conf(resin配置文件 今天的主角)
    |        |--lib
    |--src
          |--java(用于放置java源文件)
          |--test(测试文件目录)
          |--webapp(web应用的根目录,将来doc-dir会指向这里)
                    |---WEB-INF
                                |------classes
                                |------lib
                                |------web.xml(web配置文件)
                                |------applicationContext.xml(其他配置文件)


以下是resin.conf文件源码
< caucho .com >
< log  id ='/logs'  href ='stderr:'  timestamp ='[%Y-%m-%d  %H:%M:%S.%s]' />

< http-server  error-log ="logs/errors.log" >
    
< doc-dir > ../src/webapp </ doc-dir >
  
  
<!--  the http port  -->
  
< http  port ='82'/>

  
<host id =''>
    
<web-app id ='/'>
        
<work-dir > ../../build/work </ work-dir >
        
< temp-dir > ../../build/tmp </ temp-dir >
        
< cache-mapping  url-pattern ="/*"  expires ="2" />
        
< class-update-interval >
            100000000
        
</ class-update-interval >
        
< jsp  jsp-update-interval ="1s" />
        
        
< classpath  id ='WEB-INF/classes'/>     

    
</web-app >     
  
</ host >

</ http-server >
</ caucho.com >

web.xml源代码
<? xml version="1.0" encoding="ISO-8859-1" ?>
<! 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 >

    
< display-name > Acme Corp </ display-name >

    
< filter >
        
< filter-name > webwork </ filter-name >
        
< filter-class > com.opensymphony.webwork.dispatcher.FilterDispatcher </ filter-class >
    
</ filter >

    
< filter-mapping >
        
< filter-name > webwork </ filter-name >
        
< url-pattern > /* </ url-pattern >
    
</ filter-mapping >

    
< listener >
        
< listener-class > org.springframework.web.context.ContextLoaderListener </ listener-class >
    
</ listener >

    
< welcome-file-list >
        
< welcome-file > index.jsp </ welcome-file >
        
< welcome-file > default.jsp </ welcome-file >
        
< welcome-file > index.html </ welcome-file >
    
</ welcome-file-list >

    
<!--
        This typically isn't required, as the taglib is included in webwork.jar.
        If you really need a taglib configuration within web.xml, copy webwork/src/java/META-INF/taglib.tld
        to the WEB-INF directory as webwork.tld.
     
-->
    
<!-- taglib>
        <taglib-uri>webwork</taglib-uri>
        <taglib-location>/WEB-INF/webwork.tld</taglib-location>
    </taglib
-->
</ web-app >

你可能感兴趣的:(轻松搭建resin开发平台--Resin配置详解)