This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to pass parameter in multipart post request  RSS feed

 
saudi root
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello ,

i just try to send parameter when i use enctype form "UPLOAD" . When the parameters send to JSP received in NULL value

example :-



in upload.jsp i cant use getParameter("fname");

can anyone help me ?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66187
149
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) You should not be submitting to a JSP. There should be no Java code in a modern JSP, so the upload should be handled in a servlet.

2) The getParameter() family of methods do not work with multi-part requests.

2) Are you using a 3rd party library to parse the multi-part request? If so, it will provide an API to get parameters.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!