• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

location element in the error-page element

 
Leena Diwan
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friend,

Please tell me if the <location> element in the <error-page> element should start with a '\' or not?

Thanks in advance

Leena
 
Anthony Watson
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, the location element should start with a '/'

Let's say you wanted to map an exception of class MyException to a particular error page. There may be several pages that could throw MyException and these pages could be located in different directories. Thus, you cannot have the error page mapped to a page relative location, because you don't know which pages are going to throw MyException. A root relative location will always work properly no matter which page throws MyException.
 
Leena Diwan
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey thanks a lot! That did clear things

Cheers!
Leena
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic