Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

<c:catch> tag  RSS feed

 
MaheshS Kumbhar
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


In above code example, the variable declared as var gets assigned to exception object that's created inside tag.
Then what is the difference between the implicit exception object and the one with named var?
 
Ankit Garg
Sheriff
Posts: 9608
36
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The implicit exception object is only available in pages that have isErrorPage attribute of page directive set to true. These are special pages which generally we use to show a user friendly page when anything goes wrong in our application. The exception object created using c:catch can be used on any page i.e. on any page which has the c:catch tag and any exception occurs inside the body of the c:catch tag...
 
MaheshS Kumbhar
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ankit
but I didnt get your second point. ie. on which pages can we use exception object created using <c:catch> tag?
 
Ankit Garg
Sheriff
Posts: 9608
36
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use <c:catch> on any JSP page, whether its isErrorPage is set to true or false...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!