Servelet注意

来源:互联网 发布:arcgis js v44 api 编辑:程序博客网 时间:2024/05/18 13:26

1、映射URL不能设置为"/action/*.xx"

2、Servlet程序不能被设置为Web应用程序的目录默认网页文档

<servlet-mapping>
        <servlet-name>HelloName</servlet-name>
        <url-pattern>/demo/hello.html</url-pattern>
    </servlet-mapping>

<servlet-mapping>
        <servlet-name>HelloName</servlet-name>
        <url-pattern>/action/*</url-pattern>
    </servlet-mapping>

<servlet-mapping>
        <servlet-name>HelloName</servlet-name>
        <url-pattern>*.do</url-pattern>
    </servlet-mapping>


3、默认网页文档的格式为 

<welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.xhtml</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>


0 0
原创粉丝点击