tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: mailer-taglib v1.1 error when changing database
Date Wed, 02 May 2007 19:38:53 GMT
> Hi Philip,
> I haven't worked with the mailer-taglib, but I'm familiar with other
> taglibs and some basic concepts of taglibs and also the specific error
> you are getting, I'm not sure if I can help but I'll try.
> It would be useful for us to see relevant snippets of code that causes
> this error, in order to diagnose the problem.
> Please post the section between
> 	<mt:send>
> 	</mt:send>
> and also post any other code that you think is relevant.
> According to the documentation
> this error java.lang.StringIndexOutOfBoundsException: String index out
> of range: -1 is caused when "..... indicate that an index is either
> negative or greater than the size of the string."
> And the above error is occurring when the substring method is invoked
> on something in
> org.apache.taglibs.mailer.SendTag.doStartTag(
> Looking at line 265 of would give additional clues.
> -Regards
> Rashmi
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
Hi Rashmi,

Thanks for your interest:

as follows is info as requested. It is odd because it is exactly same code
as when I use dummy database, which works. I have verified correct mysql
parameters however will look into what the database is actually pulling up
and see if there are problems there.

block of code around
		// check for more than one address
		if (ref.indexOf(',') != -1) {
		    // position of the start of the error inducing address
		    int pos = ref.substring(0, ae.getPos()).indexOf(',') + 1;
		    // extract the error inducing address
		    ref = ref.substring(pos, ref.indexOf(','));

mt code:
<mt:mail server=""
to="" authenticate="true"
user="" password="xxxxxxxx" subject="Strange
Cargo Newsletter" >

<c:forEach var="subs" items="${subscribers.rows}" varStatus="status">
<mt:addrecipient type ="bcc">${subs.subscriberemail}</mt:addrecipient>

<mt:message type="html">
mt info:
to: is populated
bcc: is populated with correct mysql parameters

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message