JavaWeb工程中web.xml基本配置

    1. <servlet-mapping>
    2. <servlet-name>CustomerServlet</servlet-name>
    3. <url-pattern>/CustomerServlet</url-pattern>
    4. </servlet-mapping>

    上面是对的
    下面是错的

    1. <servlet-mapping>
    2. <servlet-name>CustomerServlet</servlet-name>
    3. <url-pattern>CustomerServlet</url-pattern>
    4. </servlet-mapping>