tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Passey <kpas...@kdpsoftware.co.uk>
Subject RE: Mailer Tag library - any additions.
Date Mon, 15 Jul 2002 13:54:53 GMT
Well that sorted it..

As I had messed around with the TLD file I thought I'd start again from
scratch so I deleted both and put tried Gin Chen's code.

Here it is....

<mt:mail server="dilbert" subject="Bsafe/400e DemoRequest"
from="info@kdp.co.uk">
 <mt:setrecipient type="to"><%= request.getParameter("Email")%>
</mt:setrecipient>
 <mt:message> Your Bsafe Demo will be mailed to you
 </mt:message>
 <mt:send/>
  
 </mt:mail>

And it worked...

Thanks to everyone who contributed to this thread.

Don't change the tld file...

Blow me this was the second example in the documentation...

RTFM everyone..including me!!

Regards

Kevin

-----Original Message-----
From: Chen, Gin [mailto:Gin_Chen@tvratings.com]
Sent: 12 July 2002 17:30
To: 'Tag Libraries Users List'
Subject: RE: Mailer Tag library - any additions.


according the the mailer documentation:
http://jakarta.apache.org/taglibs/doc/mailer-doc/mailer-1.0/index.html
none of the items you are setting accept runtime expressions. Runtime
Expressions is not controlled by a simple on/off type switch. It has to be
built into the taglib.
have you tried using:
<mt:setrecipient type="cc">foo@home.net</mt:setrecipient>

you might be able to do something like:

<mt:mail server="dilbert" subject="Bsafe/400e DemoRequest"
from="info@kdpsoftware.co.uk">
	<mt:setrecipient type="cc"><%= request.getParameter("Email")
%></mt:setrecipient>
</mt:mail>

Or even better (although I dont know if it will support it) use the new EL
of JSTL and do something like:

<mt:mail
	server="dilbert"
	subject="Bsafe/400e DemoRequest"
	from="info@kdpsoftware.co.uk"
	to="${request.email}"
>

I haven't been able to really use the EL functionality in my projects cause
we havent ported to a container that supports JSP1.2 yet (hopefully, soon)
so the syntax might not be absolutely correct but give it a try.
-Tim

-----Original Message-----
From: Kevin Passey [mailto:kpassey@kdpsoftware.co.uk]
Sent: Friday, July 12, 2002 11:17 AM
To: Taglibs (E-mail)
Subject: Mailer Tag library - any additions.


As the rtexprvalue is set to no on all of the address parameters, am I to
assume this tag library will not allow variables in the "from/to/cc/bcc"
tags.

Here is what my taglib book says "the rtexprvalue element defines whether an
attributes value is hard coded at design time, or as a constant stream, or
is the result of the evaluation of a Java expression, at run time
(rtexprvalue stands for "runtime expression value").  If its dynamic, the
value of rtexprvalue must be true or yes, and the value of the attribute
must be calculated with a JSP expression.  If the value is static, it must
be false or no, and the value must be hard coded at design time.  The
default value is false static attributes must be passed as strings."

So my assumption is that as these are defined as "no" in the tag library -
static strings must be used - not a lot of good if you are trying to pass an
email address from a form.

Anybody more experienced than me care to offer an opinion or a work around.

Thanks for your help anyway

Kevin Passey

--
To unsubscribe, e-mail:
<mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:taglibs-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:
<mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:taglibs-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message