Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

url-pattern for Exact Match

 
Alec Lee
Ranch Hand
Posts: 569
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HFS p586 says exact matching url-pattern must begin with a slash e.g.
<url-pattern>/Beer/SelectBeer.do</url-pattern>.

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.
<url-pattern>Beer/SelectBeer.do</url-pattern>

So can I use the one without slash in DD and what would it matches?
 
B.Sathish
Ranch Hand
Posts: 372
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 378
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<url-pattern> </url-pattern>

URL must start with " /Beer.do " ...

OR

use wild card " *.do "...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic