tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmanola...@yahoo.com
Subject Re: WEB-INF classloading and on the fly compilation
Date Thu, 14 Sep 2000 21:47:39 GMT

On Thu, 14 Sep 2000, Stefano Mazzocchi wrote:

> cmanolache@yahoo.com wrote:
> > 
> > :-)
> > 
> > You could also find the webapp root ( getRealPath("/") ) and compute the
> > classpath yourself - but I would say this is worse, since you'll rely on a
> > run-time directory structure that may not exist ( again, war file format
> > is a deployment format, not a run-time format ).


> This works _ONLY_ if classloading is performed thru files... what
> happens if I have a NetworkClassLoader a JDBCClassLoader or a
> OnTheFlyAssembledClassLoader? no compiler existing today (I just checked
> ALL the existing java compiler I could find!) would be able to compile
> against classes loaded thru a classloader.

One would argue that compilation should happen at deployment, not at
runtime. 


> everything, ranging from a database to a compiler... so you don't go
> shopping for tons of jar, but you just drop  the WAR on the webapp
> folder and you're done. Period.
> 
> The WAR packages were created for that right? Good, but this idea is
> broken by the fact that all existing java compilers assume that classes
> are loaded from disk.

You may have additional problems - even if you include a javac compiler in
your WAR, the sandbox will not allow you to use it too much. Some servers
may care about security ( well, I'm dreaming, nobody cares about that
today :-). 


> Damn, now I need to write a java compiler :(

Maybe an OS too - all those existing OSes that are using this bad
filesystem concept ... :-)

Costin


Mime
View raw message