打开resin.conf,改以下几个地方:
  
<!--<app-dir>\doc</app-dir>-->
  <app-dir>doc</app-dir>             //这是你网页的根目录
<!-- the http port -->
  <http port='80'/>                  //此处为端口  <!--
     - The srun port, read by both JVM and plugin
     - 127.0.0.1 is the localhost
    -->
  <srun host='127.0.0.1' port='6802'/>      
      //你机器的ip,127.0.0.1为本地ip该文件上都说明有什么标记是做什么用的,认真看看。

解决方案 »

  1.   

    <web-app id='/Smoke' app-dir='F:\resin-2.0.4\webapps\Smoke'>
          <!-- how often to check servlets for changes (id used for brevity) -->
          <class-update-interval id='2'/>      <!--
             - The classpath directive may be repeated.  Source is optional
             - Servlets and beans generally belong in WEB-INF/classes
            -->
          <classpath id='F:\resin-2.0.4\webapps\Smoke\WEB-INF\classes'
                     source='F:\resin-2.0.4\webapps\Smoke\WEB-INF\classes'
                     compile='true'/>      <!--
             - Expires time for a cacheable file.  Production sites will
             - normally change this to '15m'
            -->
          <cache-mapping url-pattern='/' expires='2s'/>      <!--
             - set the pages to be used as welcome (index) files
            -->
          <welcome-file-list>Default.jsp, index.xtp, index.jsp, index.html</welcome-file-list>      <session-config>
            <session-max>4096</session-max>
            <session-timeout>30</session-timeout>
            <enable-cookies>true</enable-cookies>
            <enable-url-rewriting>true</enable-url-rewriting>        <!--
               - Store sessions in the filesystem, so they can persist across
               - servlet and class changes.
               -
               - Uncomment this during development.
              -->
            <!--
               -  <file-store>WEB-INF/sessions</file-store>
              -->
          </session-config>      <!-- enable multipart-mime/form processing -->
          <!--
             - <multipart-form upload-max='-1'/>
            -->      <!--
             - special mapping so /servlet/pkg.MyServlet invokes pkg.MyServlet
            
          <servlet-mapping url-pattern='/servlet/*' servlet-name='invoker'/>
            -->
          <!-- 
             - The following entries configuration the examples.  You may safely
             - delete anything from here down.
            -->      <!-- Application init parameters, see Env.java to get the values -->
          <context-param info='An application information string'/>      <!-- snoop-servlet handles all urls starting with /snoop -->
          <servlet-mapping url-pattern='/main' servlet-name='main'/>
          <servlet-mapping url-pattern='/fjgl' servlet-name='fjgl'/>
          <servlet-mapping url-pattern='/xlsz' servlet-name='xlsz'/>      <!-- configure snoop-servlet with init parameters -->
          <servlet servlet-name='main' servlet-class='jxsmokeweb.servlet.main'>
            <init-param>
              <param-name>USERID</param-name>
              <param-value>smdbo</param-value>
            </init-param>
            <init-param>
              <param-name>USERPWD</param-name>
              <param-value>smdbo</param-value>
            </init-param>
            <init-param>
              <param-name>DRIVENAME</param-name>
              <param-value>sun.jdbc.odbc.JdbcOdbcDriver</param-value>
            </init-param>
            <init-param>
              <param-name>JDBCURL</param-name>
              <param-value>jdbc:odbc:odbc_smoke</param-value>
            </init-param>
          </servlet>
          <servlet servlet-name='fjgl' servlet-class='jxsmokeweb.servlet.fjgl'>
          </servlet>
          <servlet servlet-name='xlsz' servlet-class='jxsmokeweb.servlet.xlsz'>
          </servlet>      <!-- /~user maps to user directories 
          <path-mapping url-regexp='^/~([^/]*)' real-path='/home/$1/public_html/'/>
          -->
        </web-app>报错如下:
    javax.servlet.ServletException: Class `org.apache.jasper.servlet.JspServlet'
    was not found in classpath.
    Classes normally belong in F:\resin-2.0.4\webapps\Smoke\WEB-INF\classes.
    at com.caucho.server.http.Application.instantiateServlet(Application.java:2819)
    at com.caucho.server.http.Application.createServlet(Application.java:2753)
    at com.caucho.server.http.Application.loadServlet(Application.java:2711)
    at com.caucho.server.http.Application.getFilterChainServlet(Application.java:2478)
    at com.caucho.server.http.Application.buildFilterChain(Application.java:2445)
    at com.caucho.server.http.Invocation.service(Invocation.java:276)
    at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:129)
    at com.caucho.server.http.ServletServer.serviceTop(ServletServer.java:847)
    at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:213)
    at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
    at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
    at java.lang.Thread.run(Thread.java:484)