On Wed, 1 Dec 2004 10:11:49 -0500, Shapira, Yoav <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> >it should be but it isn't because tomcat does not make a copy, and the
> >returned url is unresolvable.
>
> So you're saying the jar in $CATALINA_HOME/work is physically different
> than the one in your WEB-INF/lib directory, i.e. Tomcat's copying
> corrupts the jar?
yes... and no.
when you ask for non-jar resources, the returned url points to the
correct path (inside context directory, and tomcat doens't need to
copy them).
When you ask for jar resources, the returned url points to a directory
inside $CATALINA_HOME/work, but Tomcat does not copy anything in that
path from WEB-INF/classes (you wrote WEB-INF/lib).
In my first mail a made an example of what happens. I'll report it here:
com.mydomain.mypackage.MyClass.class.getClassLoader().getResource("pippo.txt")
returns:
file:/ ... /webapps/myapp/WEB-INF/classes/pippo.txt
^^^^^^^^^
while:
com.mydomain.mypackage.MyClass.class.getClassLoader().getResource("pippo.jar")
returns:
file:/ ... /work/Catalina/localhost/myapp/loader/pippo.jar
^^^^^^^^^^^^^^^^^^^^
where "..." stands for a path that is $CATALINA_HOME
note the difference between the two urls.
bye
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]