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 getParameter() - Incompatible Type 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 "getParameter() - Incompatible Type" Watch "getParameter() - Incompatible Type" New topic

getParameter() - Incompatible Type

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
I am using the request.getParameter(); to get a file. This file is of the org.apache.struts.upload.FormFile type. I got this compilation error: incompatible types
found : java.lang.String
required: org.apache.struts.upload.FormFile
FormFile file = request.getParameter( "theFile" );

What should I do if I cannot use the getParameter() method?
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
have a look here
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: getParameter() - Incompatible Type
jQuery in Action, 3rd edition