Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

url-pattern

 
Mathew Kuruvilla
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) How do you specify mapping a default servlet? That is if none of the URL pattern matches, rather than returning an error, can we map to a specific servlet?
2) How do you specify a mapping for index.*? That is if my webapp gets anything like index.jsp or index.html or index.php or index.asp, I want it all to go to login.jsp.
Thanks.
 
Fisher Daniel
Ranch Hand
Posts: 582
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think if you define the value of element url-pattern with "/", it mean that servlet specified by the mapping becomes the default servlet of the application..
Correct me if I am wrong
regards
daniel
[ April 18, 2003: Message edited by: Fisher Daniel ]
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!