You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Brian Hart <BH...@mail.nysed.gov> on 2003/04/29 21:42:00 UTC
c:catch error
I have a predictable sequence of events that cause an recoverable
exceptional condition when working with c:catch and c:import.
Here is the scenario:
1. First time ContentManager.contentURL contains an unknown file such
"notarealfile.htm"
<c:catch var="exceptions">
<c:import url="${ContentManager.contentURL}" />
</c:catch>
<c:if test="${exceptions != null}" >
<c:import url=""/errors/500error.html" " />
</c:if>
I receive a FileNotFound Exception which is good. The full exception
is:
javax.servlet.jsp.JspException: Problem accessing the absolute URL
"http://localhost:8988/vls/published/faq/Arts_771.htm".
java.io.FileNotFoundException:
http://localhost:8988/vls/published/faq/Arts_771.htm
at
org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireReader(ImportSupport.java:372)
at
org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:259)
at
org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:179)
at _main._jspService(main.jsp:27)
2. On the subsequent requests for the page with
ContentManager.contentURL now containing a valid file such as
'realfile.htm' I receive a
Classcast exception. If I remove the <c:catch> wrapper this condition
goes away. The exeption still occurs but it 'gracefully' recovers when
then passed a valid url. but with the c:catch I'm forever stuck in the
ClassCastException regardless of the URL passed.
Any information or suggestions would be greatly appreciated.
Thanks,
Brian