On May 28, 1:01 pm, angrybald...@gmail.com wrote:
> > Newb Taglib conceptual error:
> > "Missing tagclass for tag 'dbgrid'"
[quoted text clipped - 4 lines]
> otherwise make the DataGridTag classes and their dependencies
> available to the web app's classloader.
I have the dbgrid-1.0.4.jar in the WEB-INF/lib directory, which is why
this is so vexxing to me :)
When you say "imports have nothing to do with it" - does that mean
even though a class is available via an import, it isn't necessarily
visible to the web application context?
Lew - 29 May 2007 02:25 GMT
angrybald...@gmail.com wrote:
>> Which means the web app can't locate the class for that tag. Imports
>> have nothing to do with it;
> When you say "imports have nothing to do with it" - does that mean
> even though a class is available via an import, it isn't necessarily
> visible to the web application context?
That is correct. In fact, an "import" is necessarily not visible at runtime.
Bear in mind that "import" does not exist in the bytecode; it is a convenience
for the compiler only. What exists in the bytecode is a fully-qualified class
name every time.
At the (run-) time of first use, a class must be "brought in" to the JVM.
This is done through a ClassLoader. If the ClassLoader cannot find the class,
there is a runtime error. (Runtime errors can never have anything to do with
"import" because "import" is a compile-time concept.)
For a web app, the ClassLoader class path is as angrybaldguy described.
All "import" does is, in effect, a text translation of an unqualified class
name to a fully-qualified class name. It does nothing to guarantee runtime
availability of that fully-qualified class.

Signature
Lew