• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Java Mail Question...

 
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..
 
Bartender
Posts: 10336
Hibernate Eclipse IDE 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic