?
Solved

multipart/form-data with hidden field

Posted on 2004-04-22
4
Medium Priority
?
376 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 200 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

Introducing Priority Question

Increase expert visibility of your issues by participating in Priority Question, our latest feature for Premium and Team Account holders. Adjust the priority of your question to get emergent issues in front of subject-matter experts for help when you need it most.

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month14 days, 15 hours left to enroll

771 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