Two Laptop Bag
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes url-pattern for Exact Match Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "url-pattern for Exact Match" Watch "url-pattern for Exact Match" New topic

url-pattern for Exact Match

Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 569
HFS p586 says exact matching url-pattern must begin with a slash e.g.

But according to servlet spec 11.2, it only says "all other strings are used for exact matches only" which imples with or without beginning slash e.g.

So can I use the one without slash in DD and what would it matches?
Ranch Hand

Joined: Aug 18, 2005
Posts: 372
I don't think you can use without slash. I remember in my exam, there was a tricky question on this , asking to choose the right url-patterns. There were a few of them without slash. Based on what I read in HFSJ, I did not select them. I got it right as I know I got 100% on deployment and servlets.
Nicky Eng
Ranch Hand

Joined: Mar 26, 2005
Posts: 378
<url-pattern> </url-pattern>

URL must start with " / " ...


use wild card " *.do "...

From NickyEng
Diploma in Computer Studies
SCJP 1.4
Formula 1 app by Maxis (Playbook)
I agree. Here's the link:
subject: url-pattern for Exact Match
jQuery in Action, 3rd edition