程序文件夹名为:websitewebsite/WEB-INF/web.xml<web-app>
  <servlet>
    <servlet-name>connectionpool.ConnectionPoolServlet</servlet-name>
    <servlet-class>connectionpool.ConnectionPoolServlet</servlet-class>
    <url-pattern>/connectionpool</url-pattern>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet>
    <servlet-name>service.Controller</servlet-name>
    <servlet-class>service.Controller</servlet-class>
    <url-pattern>/service</url-pattern>
    <load-on-startup>1</load-on-startup>
  </servlet>
</web-app>Servlet 路径 和 bean 同一目录
website/WEB-INF/classes/connectionpool 和
website/WEB-INF/classes/service
虚拟主机设置:resin.conf<caucho.com>
<iis priority='high'/><log id='errorLog/log' href='stderr:' timestamp='[%Y-%m-%d %H:%M:%S.%s]'/><java compiler="internal" compiler-args=""/>
<servlet-mapping url-pattern='*.jspa'
servlet-name='com.jivesoftware.webwork.dispatcher.ServletDispatcher'/>
<resource-ref> 
 <res-ref-name>jdbc/SQL-SERVER</res-ref-name>
  <res-type>javax.sql.DataSource</res-type>
  <init-param driver-name="com.microsoft.jdbc.sqlserver.SQLServerDriver"/> 
  <init-param url="jdbc:microsoft:sqlserver://localhost:1043;databasename=Northwind"/>
  <init-param user="sa"/>
  <init-param password="lytbyicc1981108&wm&yh"/>
  <init-param max-connections="20"/>
  <init-param max-idle-time="30"/>
</resource-ref><jsp precompile='true' static-encoding='true' recompile-on-error='true'/><http-server app-dir='d:\inetpub\wwwroot'>
  <!--<doc-dir>doc</doc-dir>-->  <http port='8080'/>
  <srun port='6802'/>  <class-update-interval>2s</class-update-interval>
  <servlet-classloader-hack>true</servlet-classloader-hack>
  <caucho-status>true</caucho-status>
  <thread-max>150</thread-max>
  <thread-keepalive id='100'/>
  <request-timeout id='65s'/>
  <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='com.caucho.jsp.XtpServlet'/>
  <servlet-mapping url-pattern='*.jsp' servlet-name='com.caucho.jsp.JspServlet'/>
  <servlet-mapping url-pattern='/servlet/*' servlet-name='invoker'/>  <welcome-file-list>index.xtp, index.jsp, index.html</welcome-file-list>

错误:无法找到网页
<host id='www.ddagpc.com' error-log='d:\inetpub\wwwroot\errLog\website.log'>
<web-app id='/' app-dir='d:\inetpub\wwwroot\website>
 <classpath id='WEB-INF/classes'
 source='WEB-INF/classes'
 compile='true'/>
 <directory-servlet>none</directory-servlet>
</web-app> 
</host>


<host id='www.hgfz.cn' error-log='d:\inetpub\wwwroot\errLog\dlfzc.log'>
<web-app id='/' app-dir='d:\inetpub\wwwroot\dlfzc'>
 <classpath id='WEB-INF/classes'
                 source='WEB-INF/classes'
                 compile='true'/>
 <directory-servlet>none</directory-servlet>
</web-app>  </host>
错误是: 500 Servlet Exception
javax.servlet.ServletException
at service.Controller.doPost(Controller.java:70)
at service.Controller.doGet(Controller.java:36)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
at com.caucho.server.http.Invocation.service(Invocation.java:315)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:346)
at com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:274)
at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
at java.lang.Thread.run(Thread.java:595)
</http-server>
</caucho.com>

解决方案 »

  1.   

    补充!没有servle 的程序都可以正常运行
      

  2.   

    给你一个servlet的例子和resin配的例子,你参考一下吧。<?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
        version="2.4"> 
    <display-name>Servlet</display-name>        <servlet>
            <servlet-name>SampleServlet1</servlet-name>
            <servlet-class>ch7.SampleServlet1</servlet-class>        
        </servlet>
        <servlet-mapping>
            <servlet-name>SampleServlet1</servlet-name>
            <url-pattern>/SampleServlet1</url-pattern>
        </servlet-mapping>    <servlet>
            <servlet-name>SampleServlet2</servlet-name>
            <servlet-class>ch7.SampleServlet2</servlet-class>        
        </servlet>    <servlet-mapping>
            <servlet-name>SampleServlet2</servlet-name>
            <url-pattern>/SampleServlet2</url-pattern>
        </servlet-mapping>
    </web-app>注:/SampleServlet1 为SampleServlet1相对于当前站点或虚拟目录的访问路径<host id='localhost'>
          <document-directory>H:\jsp_web</document-directory>      
      
          <!-- configures the root web-app -->   
      <web-app id='ch7/'>
            <!-- adds xsl to the search path -->
            <class-loader>
              <simple-loader path="$host-root/xsl"/>
            </class-loader>
            <servlet-mapping url-pattern="/servlet/*" servlet-name="invoker"/>
          </web-app>
         
     </host>       注:此时SampleServlet1和SampleServlet2是放在H:\jsp_web\ch7\WEB-INF\classes\ch7下的在IE中访问他们的路径分别是http://localhost/ch7/SampleServlet1和http://localhost/ch7/SampleServlet2我看到你的web.xml里好象没有
    <servlet-mapping>
            <servlet-name>SampleServlet2</servlet-name>
            <url-pattern>/SampleServlet2</url-pattern>
    </servlet-mapping>这样的东西,希望这个例子,对你能有所帮助...
      

  3.   

    默认配置中,根据<servlet-mapping url-pattern='/servlet/*' servlet-name='invoker'/>已经可以支持访问任何servlet类了,不一定要配置<servlet-mapping/>标签---500 Excpeption 错误通常是由于程序本身引起的,应该首先检查程序有没有问题
      

  4.   

    我试过了。还是那个问题http://www.ddagpc.com你们看看!!
      

  5.   

    这种错误是servlet程序本身的错误噢,不是找不到servlet