Difference between / and /* in servlet mapping url pattern

后端 未结 5 1002
忘了有多久
忘了有多久 2020-11-21 07:39

The familiar code:


    main
             


        
5条回答
  •  有刺的猬
    2020-11-21 08:03

    I think Candy's answer is mostly correct. There is one small part I think otherwise.

    To map host:port/context/hello.jsp

    1. No exact URL servlets installed, next.
    2. Found wildcard paths servlets, return.

    I believe that why "/*" does not match host:port/context/hello because it treats "/hello" as a path instead of a file (since it does not have an extension).

提交回复
热议问题