*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes doubt in error page for DD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "doubt in error page for DD" Watch "doubt in error page for DD" New topic
Author

doubt in error page for DD

maya shukla
Greenhorn

Joined: Feb 21, 2006
Posts: 3
Hi
Please clear following doubt...

I. while declaring multiple <exception-type> in DD do we need to take care for superclass-subclass relationship as we did in catch block...catching subclass exception first....or in any sequence we can define them in DD,and it will take care of more specific first ...

II. say for an Error code "ABC" exception type is "ABCException" then either we can define <error-code> or <exception-type> ..not both..plz confirm.

Thanks a lot....
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
Hi,

I don't think the sequence like try-catch block is required in DD.

About your second question, I do not understand the reletionship beetween the Error code and Exceptions. The Error codes are HTTp Response specific and Exceptions are Java specific. For Some uncaught Exceptions The Server May throws 500 (Internal Server Error) code.

I can define both in the DD.

Thanks


Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026

say for an Error code "ABC" exception type is "ABCException" then either we can define <error-code> or <exception-type> ..not both..plz confirm.


<error-code> should be numbers like 404(notFoundError)

<error-code>
404
</error-code>


Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
maya shukla
Greenhorn

Joined: Feb 21, 2006
Posts: 3
ok,
From the above what i find is-

There is no mapping between error code(which is a number) and exception type..they are independent of each-other.

And we can define them in two different <error-page> tag.

Actually i got confused..with HDFS page 594 Bang box.

which says "you can not use <error-code> and <exception-type> togather!"

Thanks Narendra and Vishnu....
parra matta
Ranch Hand

Joined: Mar 23, 2006
Posts: 40
The container will match the closest exception in java heirarchy and if not found a match, then it will look at the root cause and try match it again. Finally, it will try to match an error-code.
Frederic Esnault
Ranch Hand

Joined: Feb 13, 2006
Posts: 284
What HFSJ means by "cannot use exception-type and error-code together" is that for one error-page block, you must have :
1. Either an exception-type or an error-code element
2. a location element pointing to the error page to use.

But you can define multiple error-page blocks in your DD


SCJP 5 - SCWCD 1.4 - SCBCD 1.3 - Certification study documents/resources: http://esnault.frederic.free.fr/certification
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doubt in error page for DD
 
Similar Threads
Doubt on send Error
error page doubt
error-page doubt
Generics Doubt