I'm running Tomcat 5.0.16 under Java 1.4.2_05.

I have a general url encoding setup to encode any urls it finds before 
serializing the dom.
It does this by calling the HttpServletResponse encodeURL() on all anchor hrefs 
and form actions.
The problem is that when it comes to a url such as:
    mailto:[EMAIL PROTECTED] to the mailing list&body=Subscribe to the mailing 
list

Tomcat tries to add a jsessionid:
    mailto:[EMAIL 
PROTECTED];jsessionid=CB3CAC6C29BE579847BCDDE48CF0670D?subject=subscribe%20to%20the%20mailing%20list&body=Subscribe%20to%20the%20mailing%20list

I would have thought that Tomcat's encoder would leave the url alone if it's a 
mailto, since there'd be no reason to preserve a session through email.
If I click on the resulting link, my mail program assumes that I'm sending mail 
to [EMAIL PROTECTED];jsessionid=CB3CAC6C29BE579847BCDDE48CF0670D
and this of course causes the mail server to choke.

Is this a bug in Tomcat, or should I be setting something to make it behave 
differently for mailto urls?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to