The reason they don't load the classes where ever they may be found is because different web apps may be using different versions of the API. This could provide inconsistencies that could cause applications to fail unexpectedly, or cause errors
more abstract than most developers would want to deal with.

On top of that some APIs belong to the application server instead of the webapp and a separation between web app libraries and server libraries is very necessary. Tomcat isn't the only application container that would give this error either, try it using Jetty or some other app server. The specs were designed by very intelligent people(in most cases) and things are done certain
ways for a reason.

Anyway, I hope I don't sound like a jerk. These are some things that the spec or the documentation might not specify that could use some explaining, so I figured an explanation might not hurt. I hope that I was able to help someone with this information.

Zack

Anoop kumar V wrote:
Yes - the documentation does help. But I think Tomcat is a bit too strict
in applying the specs - or maybe the specs are too rigid. Why not load
classes wherever they are found!!

Anyways - The delivery of the environment was today and as soon as I deleted
the j2ee.jar from the webapp/<app>/WEB-INF/lib everything seemed to work
just fine.

I cannot pull the jar out - because this is a product implementation and we
need to provide one big war to the deployment team...

Thanks so much,
Anoop

On 1/23/07, Mark Thomas <[EMAIL PROTECTED]> wrote:

Jacob Rhoden wrote:
> You raise a question I have been wondering about for quite some time,
> why is it that some libraries need to go in different places, I tend to > just copy them to different places until it works (: How does one learn
> these things?

Reading the documentation is usually a good place to start.
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html

Mark


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to