• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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: 67752
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!
 
rubbery bacon. rubbery tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic