• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

need help on multipart/form-data

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
we have an application where JSP's sending a form data to the database.
Form data validation is done on Javascript in the client side.
Everything is working fine so far.
My manager came up with a new requirement to upload and download files through the JSP's to the Oracle Database.

In form section

Previously...
<form name="ReportForm" method="POST" onSubmit="CheckFields();"
.......
.....
</form>

NOW
<form name="ReportForm" method="POST" onSubmit="CheckFields(); enctype="multipart/form-data">
.......
.....
</form>

When i put "enctype="multipart/form-data" i am getting sql exception
Exception: java.sql.SQLException: ORA-01858: a non-numeric character was found where a numeric was expected

So,my question is that....what is the effect of form data when use
enctype="multipart/form-data"?

Thanks!
 
Sheriff
Posts: 67595
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One major effect is that request.getParameter() and its cousins no longer work.
 
Ranch Hand
Posts: 240
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to get your params a different way. Here is how I'm getting them (using the oreilly.servlets package, commons.fileupload has something similar):

 
Manjit Barman
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks you so much!
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic