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-jasper/jasper2/src/share/org/apache/jasper
Date Wed, 22 Jan 2003 17:21:01 GMT
Remy Maucherat wrote:
> Hans Bergsten wrote:
>> wrote:
>>> remm        2003/01/22 03:40:00
>>>   Modified:    jasper2/src/share/org/apache/jasper
>>>   Log:
>>>   - Fix package name generation.
>>>   - Default to "org.apache.jsp" package name.
>> Why do you need a default package name? Doesn't this make it harder
>> to to use, since the package structure no longer matches the directory
>> structure?
> Because if the user doesn't set a package, it won't work with JDK 1.4. 
> So I'm forcing one by default; I know the structure won't match.

That's what I thought as well, at first. But it's not the case. What
doesn't work in JDK 1.4 is to use classes from the "default package"
(i.e. no package) in a class that is part of a package. But there's
nothing wrong with having a class in the default package per se if
it doesn't get imported or used in another, packaged class; the
generated class is not used in another class, hence it doesn't have
to be in a package. Does that make sense? If not, I can elaborate.

>> When I wrote my patch, I also felt that a default package prefix was
>> a good idea, but I dropped it in the end due to the package/directory
>> structure mismatch. If it's really important to, you should also make
>> sure the class files are generated in a directory structure that starts
>> with "org/apache/jsp/"
> I was wondering about that, actually, and thought this was inconsistent.

Yep, it is. While I was going down this road I added code in a few
places (forgot where) to also set the output dir for the class file.
But I realized after a while that the idea of a requiring a package was
flawed, so I removed it.

Hans Bergsten                                <>
Gefion Software                       <>
Author of O'Reilly's "JavaServer Pages", covering JSP 1.2 and JSTL 1.0
Details at                                    <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message