日期:2014-05-17  浏览次数:20683 次

下面是tomcat里面的web.xml配置的信息,能不能帮我解释一下,刚学jsp,谢谢!Root和wedav里面的web.xml的片段
<!-- JSPC servlet mappings start -->

  <servlet>
  <servlet-name>org.apache.jsp.index_jsp</servlet-name>
  <servlet-class>org.apache.jsp.index_jsp</servlet-class>
  </servlet>

  <servlet-mapping>
  <servlet-name>org.apache.jsp.index_jsp</servlet-name>
  <url-pattern>/index.jsp</url-pattern>
  </servlet-mapping>

<!-- JSPC servlet mappings end -->

  <servlet>
  <servlet-name>webdav</servlet-name>
  <servlet-class>org.apache.catalina.servlets.WebdavServlet</servlet-class>
   
   
   
  <init-param>
  <param-name>listings</param-name>
  <param-value>true</param-value>
  </init-param>  
  </servlet>
  
  
  
  <servlet-mapping>
  <servlet-name>webdav</servlet-name>
  <url-pattern>/*</url-pattern>
  </servlet-mapping>

------解决方案--------------------
HTML code

<!-- JSPC servlet-->

  <servlet>
  <servlet-name>org.apache.jsp.index_jsp</servlet-name>
  <servlet-class>org.apache.jsp.index_jsp</servlet-class>
  </servlet>
<servlet>
  <servlet-name>webdav</servlet-name>
  <servlet-class>org.apache.catalina.servlets.WebdavServlet</servlet-class>
    
    
    
  <init-param>
  <param-name>listings</param-name>
  <param-value>true</param-value>
  </init-param>   
  </servlet>


  <!-- JSPC servlet mappings -->

     
   <servlet-mapping>
  <servlet-name>org.apache.jsp.index_jsp</servlet-name>
  <url-pattern>/index.jsp</url-pattern>
  </servlet-mapping>
   
  <servlet-mapping>
  <servlet-name>webdav</servlet-name>
  <url-pattern>/*</url-pattern>
  </servlet-mapping>

------解决方案--------------------
探讨

HTML code

<!-- JSPC servlet-->

<servlet>
<servlet-name>org.apache.jsp.index_jsp</servlet-name>
<servlet-class>org.apache.jsp.index_jsp</servlet-class>
</servlet>
<servlet>
<servlet-name>……

------解决方案--------------------
<servlet>
<description>errorServlet</description>
<display-name>errorServlet</display-name>
<servlet-name>errorServlet</servlet-name>
<servlet-class>com.accp.servlet.errorServlet</servlet-class>
</servlet>
<servlet>
<description>okServlet</description>
<display-name>okServlet</display-name>
<servlet-name>okServlet</servlet-name>
<servlet-class>com.accp.servlet.okServlet</servlet-class>
</servlet>


<servlet-mapping>
<servlet-name>errorServlet</servlet-name>
<url-pattern>/errorServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>okServlet</servlet-name>
<url-pattern>/okServlet</url-pattern>
</servlet-mapping>


<welcome-file-list>
 

<welcome-file>index.jsp</welcome-file>