tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: Tomcat 3.2.3 WAR files and 4.0
Date Wed, 26 Sep 2001 00:01:01 GMT

On Tue, 25 Sep 2001, Neeraj Vora wrote:

> Date: Tue, 25 Sep 2001 14:16:15 -0700
> From: Neeraj Vora <>
> Reply-To:
> To:
> Subject: Re: Tomcat 3.2.3 WAR files and 4.0
> Craig,
> The class in question does not have any package associated with it so what
> do I do an import for? This worked without any problem in Tomcat-3.2.3. The
> class in question is present in the WEB-INF/classes folder.

JSP Spec 1.2 (Final Version), Section 8.2, says:

  "The JSP Page implementation object [the base class for the
  servlet generated from your page] belongs to an implementation-
  dependent named package.  The package used may vary between one
  JSP and another, so minimal assumptions should be made.  The
  unnamed package should not be used without an explicit "import"
  of the class.

The first part of this (about the base class being implementation
dependent) was in JSP 1.1 (Section 3.2), but the second part (and in
particular the last sentence) wasn't ...  and this led to portability
problems like the one you are observing because many people do not
understand the implication.

Classes in unnamed packages would happen to work without import *only* if
your container did not put its generated servlets into a package at all
(which is what Tomcat 3.2 did).  Thus, your page was relying on a specific
detail of Tomcat 3.2's behavior, and it would not be portable to most
other Servlet 2.2 containers either.

> Thanks,
> Neeraj


View raw message