Hi Daniel, I think this is because the attribute must be static, e.g. can't be a runtime value. You'd have to check the TLD.
I'll tack looking at this on the todo list for the JavaMail tags. If you happen to find that it is a serious problem, plese submit a patch :) Cheers, Jayson Falkner [EMAIL PROTECTED] Daniel Jayapaul wrote: > Hi Guys > > I have downloaded this JSP mail from jspinsider.com > > and I have used this and I supplied values using > varaibles everything works fine but If I supply > the value for the attachment it is not accepting > I can pass values to all tags except this > <% String urlAtt ="c:/example.txt" ; %> > > <JavaMail:bodyPart type="file" uri="<%=urlAtt%>"/> > > This line gives file not found exception > > Can any one tell me how to pass value to this tag ? > > If I use like this > <JavaMail:bodyPart type="file" uri="c:/example.txt"/> > it works fine.., > > > > <% String smtp="203.148.249.19"; %> > > <%@ taglib uri="http://www.jspinsider.com/jspkit/JavaMail" > prefix="JavaMail"%> > <JavaMail:mimeMessage > server="<%=smtp%>" > from="[EMAIL PROTECTED]" > subject="Test email."> > <% String [EMAIL PROTECTED] %> > <JavaMail:recipient><%=name%></JavaMail:recipient> > <JavaMail:recipient > type="bcc">[EMAIL PROTECTED]</JavaMail:recipient> > <JavaMail:recipient > type="cc">[EMAIL PROTECTED]</JavaMail:recipient> > > <% String urlAtt ="c:/example.txt" ; %> > > <JavaMail:bodyPart type="file" uri="<%=urlAtt%>"/> > > <JavaMail:bodyPart type="url" > uri="http://www.jspinsider.com/index.html"/> > </JavaMail:mimeMessage> > > <h2> Message Sent to Following Recipients</h2> > > > E.Daniel Jayapaul > Java Team Leader > Mustang Technologies Co., Ltd. > 99/29, Moo 4,Chaengwattana Road > Klong Gleua,Pakkred > Nonthaburi 1120,Thailand > http://www.mustang-technologies.com > Tel: 662 583 6161 -5 > Fax: 662 583 6535 > > =========================================================================== > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > > =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
