Page 1 of 1

About Question enthuware.jwpv6.2.1047 :

Posted: Sat Feb 23, 2013 5:41 pm
by ETS User
Both *.* and /*.* cause a 404 exception on Tomcat 7. Can you explain?

Re: About Question enthuware.jwpv6.2.1047 :

Posted: Sat Feb 23, 2013 5:48 pm
by admin
As per section 12.2 of Servlet 3.0 specification
A string beginning with a ‘*.’ prefix is used as an extension mapping.
It doesn't say anywhere that *.* is invalid. So it should work as explained. If not, then tomcat is not compliant.

HTH,
Paul.

Re: About Question enthuware.jwpv6.2.1047 :

Posted: Sat Mar 14, 2015 2:06 pm
by tanzwud
Where to find information that option 1 is actually valid?
From serlvet spec
"A string beginning with a ‘*.’ prefix is used as an extension mapping."
In case of "*.*" -> an asterisk "*" beginning with "*." where asterisk not a string or is a string? There is no inormation at all about "*.*" is legal or not. What means is 50/50 that container support that feature.
Book Head First Servlets and JSP 2nd edition page 618 chapter 11 states

Code: Select all

<url-pattern>*.do</url-pattern>
"MUST begin with an asterisk (*) (NEVER with a slash). "
"After the asterisk, it MUST have a dot extension (.do, .jsp, etc.)."
Thx

Re: About Question enthuware.jwpv6.2.1047 :

Posted: Sat Mar 14, 2015 9:15 pm
by admin
There is no explicit mention in the specific that it is valid or invalid. It doesn't break any rule given in the specification, so it must be valid.
Can't really comment on what is written in any book. You may check with the author of the book and see if he/she responds.

HTH,
Paul.