Re: [jetty-user] Jetty webapps external jar files

Jan Bartel <[email protected]> Wed, 24 Apr 2013 15:22:40 +1000
Newsgroups gmane.comp.java.jetty.support
Message-ID <CALg=VpiPK1oEr-6SkSr-SSsNXVFU+radWbsUE1M+N+MMNtwG8g@mail.gmail.com>
--001a11c2653aa57c7304db147d40
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

John,

If you want the external jars to behave as if they were in WEB-INF/lib,
then you can specify them as extraClassPath using a context xml file. See
this doco here:
http://www.eclipse.org/jetty/documentation/current/jetty-classloading.html#=
adding-extra-classpaths

If you want them to act as being on the container's classpath, then you
were on the right track in putting them in lib/ext. If you say it "didn't
work", please describe what you mean by that. Perhaps you meant that they
contain annotations and they weren't scanned? In that case, read the
following doc which describes how to ensure that jars that are on the
containers classpath are scanned:
http://www.eclipse.org/jetty/documentation/current/configuring-webapps.html=
#webapp-context-attributes

Jan


On 24 April 2013 07:24, johnrg <[email protected]> wrote:

> Hi,
>
> I am new to jetty and I am using jetty version 9. I have an war file
> deployed to my app server. the web-inf/lib file has a few jar files  but =
I
> need to deploy some other jar files that are not included in the
> web-inf/lib
>
> I tried to copy the jar file  into jetty.home/lib/ext    but this is not
> working.
>
> please let me know how to do this so that the application can load the
> class
> files.
>
> thanks
> John
>
>
>
> --
> View this message in context:
> http://jetty.4.x6.nabble.com/Jetty-webapps-external-jar-files-tp4960434.h=
tml
> Sent from the Jetty Support mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>


--=20
Jan Bartel <[email protected]>
www.webtide.com =96 Developer advice, services and support
from the Jetty & CometD experts.

--001a11c2653aa57c7304db147d40
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div>John,<br><br>If you want the external jars to be=
have as if they were in WEB-INF/lib, then you can specify them as extraClas=
sPath using a context xml file. See this doco here: <a href=3D"http://www.e=
clipse.org/jetty/documentation/current/jetty-classloading.html#adding-extra=
-classpaths">http://www.eclipse.org/jetty/documentation/current/jetty-class=
loading.html#adding-extra-classpaths</a><br>
<br></div>If you want them to act as being on the container&#39;s classpath=
, then you were on the right track in putting them in lib/ext. If you say i=
t &quot;didn&#39;t work&quot;, please describe what you mean by that. Perha=
ps you meant that they contain annotations and they weren&#39;t scanned? In=
 that case, read the following doc which describes how to ensure that jars =
that are on the containers classpath are scanned: <a href=3D"http://www.ecl=
ipse.org/jetty/documentation/current/configuring-webapps.html#webapp-contex=
t-attributes">http://www.eclipse.org/jetty/documentation/current/configurin=
g-webapps.html#webapp-context-attributes</a><br>
<br></div>Jan<br></div><div class=3D"gmail_extra"><br><br><div class=3D"gma=
il_quote">On 24 April 2013 07:24, johnrg <span dir=3D"ltr">&lt;<a href=3D"m=
ailto:[email protected]" target=3D"_blank">[email protected]</a>&=
gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Hi,<br>
<br>
I am new to jetty and I am using jetty version 9. I have an war file<br>
deployed to my app server. the web-inf/lib file has a few jar files =A0but =
I<br>
need to deploy some other jar files that are not included in the web-inf/li=
b<br>
<br>
I tried to copy the jar file =A0into jetty.home/lib/ext =A0 =A0but this is =
not<br>
working.<br>
<br>
please let me know how to do this so that the application can load the clas=
s<br>
files.<br>
<br>
thanks<br>
John<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href=3D"http://jetty.4.x6.nabble.com/Jetty=
-webapps-external-jar-files-tp4960434.html" target=3D"_blank">http://jetty.=
4.x6.nabble.com/Jetty-webapps-external-jar-files-tp4960434.html</a><br>
Sent from the Jetty Support mailing list archive at Nabble.com.<br>
<br>
---------------------------------------------------------------------<br>
To unsubscribe from this list, please visit:<br>
<br>
=A0 =A0 <a href=3D"http://xircles.codehaus.org/manage_email" target=3D"_bla=
nk">http://xircles.codehaus.org/manage_email</a><br>
<br>
<br>
</blockquote></div><br><br clear=3D"all"><br>-- <br>Jan Bartel &lt;<a href=
=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&gt;<br>=
<a href=3D"http://www.webtide.com" target=3D"_blank">www.webtide.com</a> =
=96 Developer advice, services and support <br>
from the Jetty &amp; CometD experts.
</div>

--001a11c2653aa57c7304db147d40--