K
Kai Grossjohann
I have code in some JSPs that throws exceptions. I would like to
specify what happens depending on the exception class.
In Java, I can say:
try {
... some code ...
} catch (FooException e) {
... handle one kind of exception ...
} catch (BarException e) {
... handle another kind of exception ...
}
In JSP, I say:
<c:catch var="exc">
... some code ...
</c:catch>
<c:if test="${exc != null}">
... handle exception ...
</c:if>
The question is, in the "handle exception" part, how to do different
things depending on the class of the exception?
It seems that the EL includes a reserved word "instanceof" but it
isn't used yet.
Using Tomcat 4.1 with JSTL 1.0.
Kai
specify what happens depending on the exception class.
In Java, I can say:
try {
... some code ...
} catch (FooException e) {
... handle one kind of exception ...
} catch (BarException e) {
... handle another kind of exception ...
}
In JSP, I say:
<c:catch var="exc">
... some code ...
</c:catch>
<c:if test="${exc != null}">
... handle exception ...
</c:if>
The question is, in the "handle exception" part, how to do different
things depending on the class of the exception?
It seems that the EL includes a reserved word "instanceof" but it
isn't used yet.
Using Tomcat 4.1 with JSTL 1.0.
Kai