• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Mail Question...

 
Jack Daniel
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,..

Well, i have started writing an e-mail program, which is used for sending e-mail with attachments. Everything works fine, but in the <FORM> i did not include ENCTYPE = "multipart/form-data". In the documentation i see that it has to be included, but why?? when my application is running without this.

In case if i include ENCTYPE = "multipart/form-data" in the <FORM>, then the problem comes !! In the servlet any
is always returning null; in other words all the HTML FORM input parameters are null, when i read from servlet.
If i remove ENCTYPE = "multipart/form-data" from <FORM> tag, it is back to running good.

Can anybody shed more light on this <FORM ENCTYPE="multipart/form-data" >
I appreciate your help on this matter..
Thanks again..
 
Jack Daniel
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
another point:

I use METHOD="post" in the <FORM> tag, so i do not know how
ENCTYPE = "multipart/form-data" is causing problem..

please share your opinion(s)
Thanks..
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ENCTYPE = "multipart/form-data" is required if you want to post data other than text values - which you do if you want to upload attachements. For your Servlet to be able to understand this you'll need a request wrapper whcih can parse this content type. You might want to look at this.
 
Jack Daniel
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic