About Question enthuware.jwpv6.2.1047 :

Moderator: admin

Post Reply
ETS User

About Question enthuware.jwpv6.2.1047 :

Post by ETS User »

Both *.* and /*.* cause a 404 exception on Tomcat 7. Can you explain?

admin
Site Admin
Posts: 10046
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.1047 :

Post 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.
If you like our products and services, please help us by posting your review here.

tanzwud
Posts: 19
Joined: Mon Sep 01, 2014 9:45 pm
Contact:

Re: About Question enthuware.jwpv6.2.1047 :

Post 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

admin
Site Admin
Posts: 10046
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.1047 :

Post 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.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests