Solved

multipart/form-data with hidden field

Posted on 2004-04-22
4
370 Views
Last Modified: 2009-07-29
I am trying to implement an upload program using servlet, so I have create a HTML form like this
<HTML>
<FORM ACTION="myUploadServlet" METHOD=POST ENCTYPE="multipart/form-data">
  Which file to upload? <INPUT TYPE=FILE NAME=file1><INPUT TYPE=SUBMIT>
  <input type="hidden" name="action" value="upload_photo">
  <input type="hidden" name="success_url" value="upload_success.html">
</FORM>
</HTML>

But when the form is trying to submit, my servlet didn't get any of the parameter from the hidden field. My servlet is using,
req.getParameter("action") and req.getParameter("success_url") to get those parameter. Please help. Many Thanks !
0
Comment
Question by:clo1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 92

Accepted Solution

by:
objects earned 50 total points
ID: 10886274
you need to use a multipart parser to handle reading the parameters.
Such as file upload from jakarta
0
 
LVL 92

Expert Comment

by:objects
ID: 10886588
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
map related example 6 59
Unhandled exception type Exception 18 52
printf performancy 11 86
swing controls 2 24
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question