Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Force webapp to use different javax.mail from that one included in lib/jndi

I'd probably make a fresh jndi.mod, called eg my-jndi.mod that is copied from $JETTY_HOME/modules/jndi.mod and put it into $JETTY_BASE/modules. Then I'd change the last line of it to refer to a different lib, eg lib/my-jndi. So the module would look like this:

[name]
myjndi

[depend]
server

[lib]
lib/jetty-jndi-${jetty.version}.jar
lib/my-jndi/*.jar


Put the javax.mail jars and any others you need into $JETTY_BASE/lib/my-jndi. Then all you need to do is to activate it with a java -jar ../start.jar --add-to-start=my-jndi and you're done.

The good thing about this approach is that it is portable across any updates to different versions of jetty.

Jan

On 10 May 2017 at 14:39, Raffaele Gambelli <R.Gambelli@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi all jetty-users,

I'm quite newbie in Jetty, I've used Tomcat for many years, I would like to know the best practice to force my webapp to use javax.mail 1.5.5 since it is using javax.mail.glassfish-1.4.1.v201005082020.jar found onĀ /srv/jetty/lib/jndi of jetty 9.3.10.

I don't believe it is safe replace that version with that one wanted by my webapplication, is it true?

At last if the best practice was to update the jar leaving it where it is, then should I remove that dependency from my webapp, in a way that in WEB-INF/lib it shouldn't be present?

Really thanks in advance, best regards

Raffaele Gambelli




_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


Back to the top