Re: [jetty-user] add external jars to the classpath

Gaurav Kumar <[email protected]> Mon, 5 Nov 2012 01:21:08 +0530
Newsgroups gmane.comp.java.jetty.support
Message-ID <CAPc-p7kTCsSV7FfzsiCNUWgi2T7E6RdgY6zxGGiiuVFhqhsGTQ@mail.gmail.com>
--0016e6dd99fbe28b0704cdb0b160
Content-Type: text/plain; charset=ISO-8859-1

Hi

@Joakim: Thankyou for the suggested link. It definitely showcases common
logging mechanism which is really helpful.

I had a rather more specific question where I want to place logback+slf4j
jars at a common location in jetty environment so the webapps could read it
but jetty should not load it during its startup. I am maintaining 2
logfiles, one for jetty logging (say, jetty.log) and one file for common
application logging for multiple wars (say testapp.log) both of which
should rollover at midnight and on every server startup.
If slf4j+logback jars are placed in jetty/lib directory then jetty starts
logging as slf4j -> logback. I however, want jetty to continue logging as
JUL in jetty.log, while, all other web applications should log using
logback in testapp.log.

*Also, if I maintain these jars at an alternate location outside the wars,
how do I let all my wars know about this new classpath to be included in
the loading context for each war?*

Please suggest.

--0016e6dd99fbe28b0704cdb0b160
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi <br><br>@Joakim: Thankyou for the suggested link. It de=
finitely showcases common logging mechanism which is really helpful.<br>=A0=
<br>I had a rather more specific question where I want to place logback+slf=
4j jars at a common location in jetty environment so the webapps could read=
 it but jetty should not load it during its startup. I am maintaining 2 log=
files, one for jetty logging (say, jetty.log) and one file for common appli=
cation logging for multiple wars (say testapp.log) both of which should rol=
lover at midnight and on every server startup. <br>

If slf4j+logback jars are placed in jetty/lib directory then jetty starts l=
ogging as slf4j -&gt; logback. I however, want jetty to continue logging as=
 JUL in jetty.log, while, all other web applications should log using logba=
ck in testapp.log.<br>

<br><b>Also, if I maintain these jars at an alternate location outside the =
wars, how do I let all my wars know about this new classpath to be included=
 in the loading context for each war?</b><br><br>Please suggest.<br></div>


--0016e6dd99fbe28b0704cdb0b160--