This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Servlets and the fly likes how to get value from enctype Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to get value from enctype" Watch "how to get value from enctype" New topic

how to get value from enctype

Sophia Choi
Ranch Hand

Joined: Mar 22, 2002
Posts: 106
In JSP, there have servername and path in the form.
The form contains enctype="multipart/form-data" and posts to a servlet.
The problem is I can't use getParameter or session.getAttribute to retrieve
So, how can I do?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63231

getParameter only works with forms posted with the default enctype (URL encoded). When you post a multipart form you either need to parse the request data yourself, or use some 3rd party software to do it. I know this has been discussed many tmes here and in the JSP forum. A little searching may find what you are looking for.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: how to get value from enctype
It's not a secret anymore!