DefaultServlet和JspServlet

tomcat中经常要用到: DefaultServlet 处理Servlet, JspServlet编译Jsp文件。

DefaultServlet

<servlet>

        <servlet-name>default</servlet-name>

        <servlet-class>org.apache.catalina.servlets.DefaultServlet

        </servlet-class>

        <init-param>

            <param-name>debug</param-name>

            <param-value>0</param-value>

        </init-param>

        <init-param>

            <param-name>listings</param-name>

            <param-value>true</param-value>

        </init-param>

        <load-on-startup>1</load-on-startup>

</servlet>

<servlet-mapping>

        <servlet-name>default</servlet-name>

        <url-pattern>/</url-pattern>

</servlet-mapping>

 

 

JspServlet

Jasper用class org.apache.jasper.servlet.JspServlet实现。

<servlet>

     <servlet-name>jsp</servlet-name>

     <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>

     <init-param>

          <param-name>logVerbosityLevel</param-name>

          <param-value>WARNING</param-value>

      </init-param>

      <init-param>

          <param-name>fork</param-name>

          <param-value>false</param-value>

      </init-param>

      <load-on-startup>3</load-on-startup>

</servlet>

 

你可能感兴趣的:(tomcat,jsp,servlet,Class)