Bug 23419 - Allow setting username & password via specific tags.
Summary: Allow setting username & password via specific tags.
Status: RESOLVED FIXED
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Mailer Taglib (show other bugs)
Version: unspecified
Hardware: All other
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-25 18:51 UTC by Dimitri
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitri 2003-09-25 18:51:09 UTC
It is common practice to store variable information (like username and password
for logging into SMTP account) in web application init-params or context params,
in order to not recompile JSP pages when such information changes. It would be
very nice to have an ability to provide username & password dynamically to
Mailer tags, for example, in the following way:

<mt:mail ...>
 <mt:user><c:out value="${initParam.SMTPUser}"/></mt:user>
 <mt:password><c:out .../></mt:password>
 ...
</mt:mail>

This seems to be the only suitable way, because Mailer taglib does not support
JSP EL to pass parameters to tags dynamically.
JavaMail 1.2 API provides a way to set default username via mail.smtp.user
property (if we pre-configure mail session instance and resolve it via JNDI),
but no property exists for setting default password.
Comment 1 Rich Catlett 2003-11-12 03:56:09 UTC
A user tag and password tag have been added, they are available in the nightly
build.