I am trying to allow users to upload files from my web site and then send me
an email with the attachment. I am able to upload the files to my server
but I am having problems including the attachments with my
The code is simple, I just cannot seem to make the connection and make it
one step.
Here is my code:
<%
FileUploadBean.doUpload(request);
out.println("Filename:" + FileUploadBean.getFilename());
out.println("<BR>Content Type:" + FileUploadBean.getContentType());
String mailServer = "";
String attachment = FileUploadBean.getFilename();
String [] to = {""};
//String [] to = {""};
String from = "";
String subject = "";
String body = "";
subject = "Document Request";
body = "Testing attachment\n\n";
body = body + "test: " + attachment + "\n\n";
the_mail.sendEmail (mailServer, subject, to ,from, body, attachment);
%>
email and am getting the follow error:
org.apache.jasper.JasperException: Unable to compile class for
JSP/usr/local/netscape/server4/https-kb-dev/config/../ClassCache/_jsps/_test
_post_jsp.java:159: Incompatible type for method. Can't convert
java.lang.String to java.lang.String[][].
the_mail.sendEmail (mailServer, subject, to ,from, body, attachment);
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html