You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Gabe Beged-Dov <be...@jfinity.com> on 2000/01/12 19:21:49 UTC

JSP Tags implemented as inner classes

I often like using a bunch of top-level inner classes
as a convenient way to group small associated classes. 
This works well alot of the time as long as you don't
hit the "$" vs. "." separator issue. 

An example I tried this morning was a JSP tagset that
did a simple transformation on a vocabulary to html.
This hits the separator issue since the compiler needs
to emit the public inner class name, e.g.
"tags.fooml.foo" that gets used to create an instance
and the runtime needs to use "tags.fooml$foo" to load
the class. There isn't an option in the tld to
differentiate the javac classname vs. the jre classname
(not that I'm suggesting that there should be) so you
have to go one way or the other.

Is there a way around this or do inner classes need to
be avoided for dynamic loading scenarios like this?

Cordially in Corvallis,

Gabe Beged-Dov

http://www.jfinity.com/gabe