File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is this legal url-pattern value?

 
Alec Lee
Ranch Hand
Posts: 569
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<url-pattern>myServlet</url-pattern>

Is this a legal value for <url-pattern>. I tested with tomcat and it throws an exception when I deploy. But, I just don't understand why this is the case. In servlet spec 11.2 point 4, it says "all other strings are used for exact matches only". So why this cannot be matched with url "http://myhost/myapp/myServlet" - isnt that an exact match?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try:
 
Alec Lee
Ranch Hand
Posts: 569
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I know the slash is what makes thing work. But, I just want to know why we can't do without a slash?
 
Alec Lee
Ranch Hand
Posts: 569
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I know the slash is what makes thing work. But, I just want to know why we can't do without a slash?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a link to the servlet spec in my signature.
Section SRV.11.2 explains the sytnax for mappings.

I think it will answer your question and then some.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Alec Lee:
In servlet spec 11.2 point 4, it says "all other strings are used for exact matches only".


Here they are talking about the absolute ones.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic