Raffaele,

Before I answer you, please tell me whether you want to use javax.mail
directly in your code to send/receive email, or do you want to use it with
jndi, eg lookup a reference to "mail/Session" ?

Jan

On 10 May 2017 at 15:56, Raffaele Gambelli <
[email protected]> wrote:

> Thanks Jan, but with your method, if jetty needs its javax.mail version
> and can't find it because I configured that it should use mine, what could
> happen?
>
> And what about of javax.mail jar of my webapp? Should I remove it from war
> I suppose
>
> I would prefer to find a way to preserve jetty javax.mail but to tell
> jetty to load my javax.mail when my webapp executes, am I wrong?
>
> Raffaele Gambelli
>
>
>
> [email protected] ha scritto: -----
> Per: [email protected]
> Da: [email protected]
> Inviato da: [email protected]
> Data: 10/05/2017 03.31PM
> Oggetto: jetty-users Digest, Vol 96, Issue 5
>
> Send jetty-users mailing list submissions to
> [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://dev.eclipse.org/mailman/listinfo/jetty-users
> or, via email, send a message with subject or body 'help' to
> [email protected]
>
> You can reach the person managing the list at
> [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of jetty-users digest..."
>
>
> Today's Topics:
>
>    1. Force webapp to use different javax.mail from that one
>       included in lib/jndi (Raffaele Gambelli)
>    2. Re: Force webapp to use different javax.mail from that one
>       included in lib/jndi (Jan Bartel)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 10 May 2017 14:39:24 +0200
> From: Raffaele Gambelli <[email protected]>
> To: [email protected]
> Subject: [jetty-users] Force webapp to use different javax.mail from
> that one included in lib/jndi
> Message-ID:
> <OF86B8A80F.759A6E4E-ONC125811C.0045866D-C125811C.
> [email protected]>
>
> Content-Type: text/plain; charset="us-ascii"
>
> An HTML attachment was scrubbed...
> URL: < https://dev.eclipse.org/mailman/private/jetty-users/
> attachments/20170510/2d1cfa24/attachment.html >
>
> ------------------------------
>
> Message: 2
> Date: Wed, 10 May 2017 15:30:57 +0200
> From: Jan Bartel <[email protected]>
> To: JETTY user mailing list <[email protected]>
> Subject: Re: [jetty-users] Force webapp to use different javax.mail
> from that one included in lib/jndi
> Message-ID:
> <CAEHc-33PCpifkrFbTWNihB88=-9Ju=npzruisgkjm1fznay...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
>
> 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 <
> [email protected]> 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
> >
> >
> >
> > element
> > Font
> > font-family
> > font-size
> > font-style
> > font-variant
> > font-weight
> > letter-spacing
> > line-height
> > text-decoration
> > text-align
> > text-indent
> > text-transform
> > white-space
> > word-spacing
> > color
> > Background
> > bg-attachment
> > bg-color
> > bg-image
> > bg-position
> > bg-repeat
> > Box
> > width
> > height
> > border-top
> > border-right
> > border-bottom
> > border-left
> > margin
> > padding
> > max-height
> > min-height
> > max-width
> > min-width
> > outline-color
> > outline-style
> > outline-width
> > Positioning
> > position
> > top
> > bottom
> > right
> > left
> > float
> > display
> > clear
> > z-index
> > List
> > list-style-image
> > list-style-type
> > list-style-position
> > Table
> > vertical-align
> > border-collapse
> > border-spacing
> > caption-side
> > empty-cells
> > table-layout
> > Effects
> > text-shadow
> > -webkit-box-shadow
> > border-radius
> > Other
> > overflow
> > cursor
> > visibility
> >
> > _______________________________________________
> > jetty-users mailing list
> > [email protected]
> > To change your delivery options, retrieve your password, or unsubscribe
> > from this list, visit
> > https://dev.eclipse.org/mailman/listinfo/jetty-users
> >
>
>
>
> --
> Jan Bartel <[email protected]>
> www.webtide.com
> *Expert assistance from the creators of Jetty and CometD*
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: < https://dev.eclipse.org/mailman/private/jetty-users/
> attachments/20170510/219e2331/attachment.html >
>
> ------------------------------
>
> _______________________________________________
> jetty-users mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
> End of jetty-users Digest, Vol 96, Issue 5
> ******************************************
>
>
>
>
> _______________________________________________
> jetty-users mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>



-- 
Jan Bartel <[email protected]>
www.webtide.com
*Expert assistance from the creators of Jetty and CometD*
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to