About Question com.enthuware.ets.scwcd.v5.2.143 :

Moderator: admin

Post Reply
bluster
Posts: 60
Joined: Wed Apr 23, 2014 6:38 pm
Contact:

About Question com.enthuware.ets.scwcd.v5.2.143 :

Post by bluster »

Pardon my ignorance if this is thick, I am just starting my studies for this test.

It is stated on one of explanations that "You cannot start an extension mapping with a /."

However Appendix A of the JSP 2.0 spec, on "JSP.A.4 The Web Application Descriptor" provides an example:

Code: Select all

<servlet-mapping>
  <servlet-name> HelloWorld </servlet-name> 
  <url-pattern> /HelloWorld.jsp </url-pattern>
</servlet-mapping>
Is this a different case because it is a jsp or can we start with a "/"?

PS: My spec file is named jsp-2_0-fr-spec.pdf, "JavaServer PagesTM Specification Version 2.0". On this file the example above can be found on page 390 of 478.

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

Re: About Question com.enthuware.ets.scwcd.v5.2.143 :

Post by admin »

/HelloWorld.jsp is not an extension mapping. It is an exact mapping.
As per section SRV 11.2 of Servlet 2.4 specification:
SRV.11.2 Specification of Mappings
In the Web application deployment descriptor, the following syntax is used to define
mappings:
• A string beginning with a ‘/’ character and ending with a ‘/*’ suffix is used
for path mapping.
• A string beginning with a ‘*.’ prefix is used as an extension mapping.
• A string containing only the ’/’ character indicates the "default" servlet of
the application. In this case the servlet path is the request URI minus the context
path and the path info is null.
• All other strings are used for exact matches only.
If you like our products and services, please help us by posting your review here.

bluster
Posts: 60
Joined: Wed Apr 23, 2014 6:38 pm
Contact:

Re: About Question com.enthuware.ets.scwcd.v5.2.143 :

Post by bluster »

Thanks, it makes sense now.

Post Reply

Who is online

Users browsing this forum: No registered users and 139 guests