I want my spring application to access url like http://myapplication.com/app1/feature/ rather than http://myapplication.com/app1/feature.html So basically how should I configure. My Current config is below it works with *.html web.xml
and it gives 404 error it I do map it to * .* etc
and it gives 404 error it I do map it to * .* etc
The servlet spec is very strict about what's allowed in a url-pattern
. You're probably looking for /*
, which will direct all requests to the DispatcherServlet
, regardless of the path. Then it's up to you to define what happens.
For reference, "Specification of Mappings" (12.2) allows the following patterns:
http://host:port/<contextroot>/
. In this case the path info is '/' and the servlet path and context path is empty string (““).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.