This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt 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 Introducing JavaFX 8 Programming this week in the JavaFX 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 agree. Here's the link:
subject: getParameter() - Incompatible Type
It's not a secret anymore!