If i use <url-pattern>/*</url-pattern>
in a dynamic web project with jax-rs on eclipse when I try to access to index.html i get an 404 error but if I use <url-pattern>/whatever/*</url-pattern>
it works correctly ,somebody knows the reason?
Asked
Active
Viewed 49 times
0

AFS
- 1,433
- 6
- 28
- 52
1 Answers
0
There is a default servlet that handles the static content, like your html page. That servlet is already mapped to /*
. Only one can win. A miss on one won't forward to checking the other.
I've seen cases where the result is opposite from what you are saying, i.e. causing 404 on the html. Instead the JAX-RS sevlet will lose. So I'm not sure what the details are as to determining which one wins, whether it's based on configuration, or if it's server specific, but the two will conflict with each other with the /*
config.

Paul Samsotha
- 205,037
- 37
- 486
- 720