tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Bergsten <>
Subject Re: cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler
Date Sun, 10 Dec 2000 08:02:04 GMT
Pierre Delisle wrote:
> Hans Bergsten wrote:
> > [...]
> > In general, I prefer imports for the reason you mention; it makes it easier
> > to see all dependencies. In generated JSP compilation classes, the important
> > thing is not to have other complete package imports than the ones in the
> > spec, but FQCN imports can't hurt anything. So, yeah, I think it's better
> > to keep imports like java.beans.Beans and org.apache.jasper.Exception.
> Actually, it could make a difference.
> Assuming tomcat puts the import 'java.beans.Beans' in all generated
> JSP servlet classes, then a developer using Tomcat can use
> 'Beans' in a scriptlet without having to worry about the import.
> However, when porting the JSP page to another engine, the compile could
> fail if the target JSP container uses a FQCN in the generated
> code rather than an import statement as tomcat does.
> Given this, it then makes sense to limit the import list to the
> 'default' one mentioned in the spec. Container specific FQCN imports
> are also OK, but anything else should not be part of the import list.
> Does that make sense?

Yes, you're right, of course :-)

Hans Bergsten
Gefion Software
Author of JavaServer Pages (O'Reilly),

View raw message