• Post Reply Bookmark Topic Watch Topic
  • New Topic

need help on multipart/form-data

 
Manjit Barman
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • 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!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One major effect is that request.getParameter() and its cousins no longer work.
 
Luke Shannon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks you so much!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!