On Wed, 22 Jan 2003, Hans Bergsten wrote:

>
> See my previous mail; you do _not_ need to have a package statement
> for the generated servlet class. Adding it just complicates life.
>

There is a situation when *not* having the package statement can cause
big problems for users.

The JSP spec doesn't mandate any particular package (or the use of a
package at all) for the generated page class.  But if the container uses
no package, users will find that they can utilize unpackaged beans without
needing to import them -- yet, as soon as they move their application to a
different container (which does put pages in a package), their app no
longer works.

Worse than that, if the new container is running on a JDK 1.4.1 system,
they can't even fix the problem by adding import statements, because 1.4.1
won't let you import unpackaged classes.

IIRC, the portability issue was why we switched from unpackaged to
packaged back in Tomcat 3.2 days.

Craig McClanahan


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to