Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8154895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:30:25+00:00 2026-06-06T16:30:25+00:00

I just read this great answer from BalusC about how to upload files with

  • 0

I just read this great answer from BalusC about how to upload files with the 3.0 Servlet API.

My question is about the use of request.getParameter() for common fields. For example, if my form looks like this :

<form action="/upload" method="post" enctype="multipart/form-data">
    <fieldset>
        <label for="description">File description:</label>
        <input type="text" id="description" name="description" value="" />

        <label for="uploadedFile">File:</label>
        <input type="file" id="uploadedFile" name="uploadedFile" />

        <input type="submit" value="Send" />              
    </fieldset>
</form>

Following what BalusC explained, I should manipulate the InputStream returned by part.getInputStream() to get the content of the description field. Why is that ? I tried to simply call request.getParameter("description"), and it seems to work fine.

I use Tomcat 7.0.20.

Thanks for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T16:30:27+00:00Added an answer on June 6, 2026 at 4:30 pm

    I tried to simply call request.getParameter(“description”), and it seems to work fine.

    Indeed, this is specified as such in the Servlet 3.0 spec, but this did not work in earlier versions of Glassfish until recently, even though it’s the reference implementation. This has been reported as Glassfish issue 16740 and has been fixed in 3.1.2, more than 2 years after the first 3.0 release.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just read this snippet from another answer : When you create a block
I just read this article: http://www.acunetix.com/websitesecurity/upload-forms-threat.htm which discusses some of the security risks involved
I just read this question and stumbled upon the following quote: Scala treats ==
I just read on this answer (answer has since been removed) and I'm sure
I just read this requirement on a job listing: Aware of the pitfalls of
I just read this: http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx I was under the impression that overwriting Object or
I have just read this in the book OpenCV 2 Computer Vision Application Programming
I've just read this description of the Android Support Package / Compatibility Library... http://developer.android.com/sdk/compatibility-library.html
I just read two articles over this topic which provide infomration inconsistent, so I
I know this question has been asked before and I read all the answers

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.