• Post Reply Bookmark Topic Watch Topic
  • New Topic

could we have this?

 
Nicky Eng
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
could we 2 error-page elements in DD ?

-----------------
.........
.........
<error-page>
<exception-type></exception-type>
<location></location>
</error-page>

<error-page>
<exception-type<exception-type>
<location></location>
</error-page>
.........
.........
--------------------
or just one only?

how about servlet element?
----------------
several <servlet> element in ONE DD...??
 
David Ulicny
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can have more than one error page and servlet definition as well.
 
Nicky Eng
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so we really can do this :

<web-app...>

<error-page>
<exception-type>java.io.IOException</exception-type>
<location>/blabla.jsp</location>
</error-page>

<error-page>
<exception-type>java.lang.Throwable<exception-type>
<location>/ja.jsp</location>
</error-page>

</web-app>

???
 
Priya Jothi
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes u can have that.

When IOException is thrown blabla.jsp will be displayed.For the rest of the exceptions ja.jsp would be displayed.

Regards,
Priya.
 
Alexandre Cervieri
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, please correct me if I'm wrong. If you are handling different exception-types you can have multiple error-pages in a single DD, but you cannot have two error pages specifing the IOException for example, right?
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!