• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java Mail Question...

 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Paul
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic