On Wed, 30 Oct 2002, Lance Prais wrote:
> 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);
This looks like a pretty straightforward and informative error
message, what's the problem? It looks like you don't have the
parameters in the right format. What is the_mail, and what is/are the
signature(s) of its sendEmail method?
Milt Epstein
Research Programmer
Integration and Software Engineering (ISE)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]
___________________________________________________________________________
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