回 帖 发 新 帖 刷新版面

主题:如果使用resin-2.1.9,请问JavaBean文件应该放在什么目录下

如果使用resin-2.1.9,请问JavaBean文件应该放在什么目录下

回复列表 (共1个回复)

沙发

   首先将Resin下的conf文件夹下的resin.conf配置文件修改如下:
<caucho.com>
<log id='/log' href='stderr:' timestamp='[%Y-%m-%d %H:%M:%S.%s]'/>
<java compiler="internal" compiler-args=""/>
<resource-ref> 
    <res-ref-name>jdbc</res-ref-name> 
    <res-type>javax.sql.DataSource</res-type> 
    <init-param driver-name="org.gjt.mm.mysql.Driver"/> 
    <init-param url="jdbc:mysql://localhost:3306/plat"/> 
    <init-param user="root"/> 
    <init-param password=""/> 
    <init-param max-connections="100"/> 
    <init-param max-idle-time="30"/> 
</resource-ref> 
<jsp precompile='true' static-encoding='true' recompile-on-error='true'/>
<http-server>

     <app-dir>C:\resin20\webapps</app-dir>
     <http port='82'/>
     <srun host='127.0.0.1' port='6802'/>
      <class-update-interval>2</class-update-interval>
      <servlet-classloader-hack>false</servlet-classloader-hack>
      <caucho-status>true</caucho-status>
      <thread-max>150</thread-max>
      <thread-keepalive id='100'/>
      <request-timeout id='30s'/>
      <accept-buffer-size id='256'/>
      <thread-min id='5'/>
      <ignore-client-disconnect>true</ignore-client-disconnect>
      <cache dir='cache' size='1024' entries='8192'/>
      <cache-mapping url-pattern='/' expires='2s'/>
      <servlet-mapping url-pattern='*.xtp' servlet-name='xtp'/>
      <servlet-mapping url-pattern='*.jsp' servlet-name='jsp'/>
      <welcome-file-list>index.xtp, index.jsp, index.html</welcome-file-list>
    <!--Disable browse your dir
      <directory-servlet>none</directory-servlet> 
    -->
    <directory-servlet>none</directory-servlet> 
      <host id=''>
            <error-log id='log/error.log'/>
            <war-dir id='webapps'/>
            <web-app id='/'>
                <classpath id='WEB-INF/classes'
                     source='WEB-INF/classes'
                     compile='true'/>
                <session-config>
                    <session-max>4096</session-max>
                    <session-timeout>300</session-timeout>
                    <enable-cookies>true</enable-cookies>
                    <enable-url-rewriting>true</enable-url-rewriting>
                </session-config>
                  <path-mapping url-regexp='^/~([^/]*)' real-path='/home/$1/public_html/' />
            </web-app>
      </host>
</http-server>
</caucho.com>

然后只要将自己的javabean文件放到自己的应用程序的WEB-INF目录下的classes目录下即可(若无classes目录可以自己新建一个)

我来回复

您尚未登录,请登录后再回复。点此登录或注册