This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new b441ffe9e4 Fix BZ 66542 - Update references to JavaMail to use Jakarta
Mail
b441ffe9e4 is described below
commit b441ffe9e4276384042eddf953f96b541e8b447a
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Mar 27 20:08:35 2023 +0100
Fix BZ 66542 - Update references to JavaMail to use Jakarta Mail
---
webapps/docs/changelog.xml | 8 ++++++++
webapps/docs/jndi-resources-howto.xml | 37 +++++++++++++++++++++++------------
2 files changed, 32 insertions(+), 13 deletions(-)
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 4986f89652..d55fd750b6 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -229,6 +229,14 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Web applications">
+ <changelog>
+ <fix>
+ <bug>66542</bug>: Documentation. Update the JNDI documentation to
+ replace references to JavaMail with references to Jakarta Mail. (markt)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Other">
<changelog>
<add>
diff --git a/webapps/docs/jndi-resources-howto.xml
b/webapps/docs/jndi-resources-howto.xml
index 3ea9e747a3..12b238dddb 100644
--- a/webapps/docs/jndi-resources-howto.xml
+++ b/webapps/docs/jndi-resources-howto.xml
@@ -66,7 +66,7 @@ resources:</p>
will operate.</li>
<li><code><strong><resource-ref></strong></code> - Resource reference,
which is typically to an object factory for resources such as a JDBC
- <code>DataSource</code>, a JavaMail <code>Session</code>, or custom
+ <code>DataSource</code>, a Jakarta Mail <code>Session</code>, or custom
object factories configured into Tomcat.</li>
<li><code><strong><resource-env-ref></strong></code> - Resource
environment reference, a new variation of <code>resource-ref</code>
@@ -619,13 +619,13 @@ create table user_roles (
</subsection>
- <subsection name="JavaMail Sessions">
+ <subsection name="Jakarta Mail Sessions">
<h5>0. Introduction</h5>
<p>In many web applications, sending electronic mail messages is a
required part of the system's functionality. The
- <a href="http://www.oracle.com/technetwork/java/javamail/index.html">Java
Mail</a> API
+ <a href="https://jakartaee.github.io/mail-api/">Jakarta Mail</a> API
makes this process relatively straightforward, but requires many
configuration details that the client application must be aware of
(including the name of the SMTP host to be used for message sending).</p>
@@ -717,7 +717,7 @@ Transport.send(message);]]></source>
and values and passed to
<code>jakarta.mail.Session.getInstance(java.util.Properties)</code> as
part of
the <code>java.util.Properties</code> collection. In addition to the
- properties defined in Annex A of the JavaMail specification, individual
+ properties defined in Appendix A of the Jakarta Mail specification,
individual
providers may also support additional properties.
</p>
@@ -726,19 +726,30 @@ Transport.send(message);]]></source>
then Tomcat's resource factory will configure and add a
<code>jakarta.mail.Authenticator</code> to the mail session.</p>
- <h5>4. Install the JavaMail libraries</h5>
+ <h5>4. Install the Jakarta Mail API</h5>
- <p><a href="http://javamail.java.net/">
- Download the JavaMail API</a>.</p>
+ <p><a
href="https://search.maven.org/artifact/jakarta.mail/jakarta.mail-api/2.1.0/jar">
+ Download the Jakarta Mail API</a>.</p>
- <p>Unpackage the distribution and place mail.jar into $CATALINA_HOME/lib
so
- that it is available to Tomcat during the initialization of the mail
Session
- Resource. <strong>Note:</strong> placing this jar in both
$CATALINA_HOME/lib
- and a web application's lib folder will cause an error, so ensure you have
- it in the $CATALINA_HOME/lib location only.
+ <p>Unpackage the distribution and place jakarta.mail-api-2.1.0.jar into
+ $CATALINA_HOME/lib so that it is available to Tomcat during the
+ initialization of the mail Session Resource.
+ <strong>Note:</strong> placing this jar in both $CATALINA_HOME/lib and a
web
+ application's lib folder will cause an error, so ensure you have it in the
+ $CATALINA_HOME/lib location only.
</p>
- <h5>5. Restart Tomcat</h5>
+ <h5>5. Install a compatible implementaion</h5>
+
+ <p>Select and <a href="https://jakarta.ee/specifications/mail/2.1/">
+ download a compatible implementation</a>.</p>
+
+ <p>Unpackage the implementation and place the jar file(s) into
+ $CATALINA_HOME/lib.</p>
+
+ <p>Note: Other implementations may be available</p>
+
+ <h5>6. Restart Tomcat</h5>
<p>For the additional JAR to be visible to Tomcat, it is necessary for the
Tomcat instance to be restarted.</p>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]