You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Willis Boyce <wb...@panix.com> on 2002/07/21 01:24:26 UTC

JspException ambiguous in compiled JSP

All,

I'm wondering if you can help me out with a quick question.  I am throwing
some JspExceptions from my JSPs.  Sounds reasonable, right?  But they
won't compile because Jasper generates two imports:

import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;

There's a JspException in both of these packages, so "throw JspException"
produces an error from javac.

I could just do "throw javax.servlet.jsp.JspException."  However, I see
that the Jasper-generated code is throwing
org.apache.jasper.runtime.JspException.  Maybe I should throw that
instead, but that would be pretty non-portable.  It seems strange that
Tomcat would step on the standard JspException implementation with one of
its own in the JSP scope.  I'm wondering if I'm missing something, like
maybe my classpath is bogus (I'm using my javac output directory plus the
standard Tomcat lib, classes, common/lib, and common/classes), or maybe
there's some other approved way to throw a JspException.  I Googled for
"ambiguous jspexception" and searched the mailing list archives and
Bugzilla, but I couldn't find anything.

Thanks,
Willis



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>