This week's giveaways are in the MongoDB and Jobs Discussion forums.
We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line!
See this thread and this one for details.
The moose likes Other Open Source Projects and the fly likes MultipartRequest cannot be resolved to a type Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply Bookmark "MultipartRequest cannot be resolved to a type" Watch "MultipartRequest cannot be resolved to a type" New topic
Author

MultipartRequest cannot be resolved to a type

Shounak Kundu
Ranch Hand

Joined: Jul 29, 2010
Posts: 60

Hi, I am trying to upload an image to database. Prior to that , I am just making the temporary file from where it will be stored in the table.

But I am getting this error.
MultipartRequest cannot be resolved to a type


Shounak
Shounak Kundu
Ranch Hand

Joined: Jul 29, 2010
Posts: 60

Here are my codes .

1) The JSP file in which I am taking the image input.

Shounak Kundu
Ranch Hand

Joined: Jul 29, 2010
Posts: 60

Mohamed Sanaulla
Bartender

Joined: Sep 08, 2007
Posts: 2925
    
  15



Am not sure if you copied it wrong here- Should the METHOD be not "POST" instead of POST?


Mohamed Sanaulla | My Blog
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56150
    
  13

Step 1: move all of the Java code out of the JSP and into a Servlet where it belongs. This is a gross misuse of technology. JSPs are for creating text views like HTML, not processing files.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Shounak Kundu
Ranch Hand

Joined: Jul 29, 2010
Posts: 60


view plaincopy to clipboardprint?

1. <BODY> <FORM ENCTYPE="multipart/form-data" ACTION= "upload.jsp" METHOD=POST> <!-- Is this a typo? Shouldn't it be "POST" -->

<BODY> <FORM ENCTYPE="multipart/form-data" ACTION= "upload.jsp" METHOD=POST> <!-- Is this a typo? Shouldn't it be "POST" -->

Am not sure if you copied it wrong here- Should the METHOD be not "POST" instead of POST?


Actually I was wrong to copy. It is "POST".

So, is there any way out ?
Mohamed Sanaulla
Bartender

Joined: Sep 08, 2007
Posts: 2925
    
  15

Shounak Kundu wrote:


I see that you are using some external package- com.oreilly.servlet.* - Do you have this jar in your classpath? And MultipartRequest is mostly from that package.
Shounak Kundu
Ranch Hand

Joined: Jul 29, 2010
Posts: 60

yes, I have the jar file in my classpath.

I am using Eclipse editor.
Mohamed Sanaulla
Bartender

Joined: Sep 08, 2007
Posts: 2925
    
  15

Can you paste the complete exception Stack trace?
Latif Khan
Greenhorn

Joined: Feb 08, 2012
Posts: 19
Shounak Kundu wrote:Hi, I am trying to upload an image to database. Prior to that , I am just making the temporary file from where it will be stored in the table.

But I am getting this error.
MultipartRequest cannot be resolved to a type


I to had the same problem . The problem is jar file. Download from official site http://www.servlets.com/cos/ , hope resolves
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: MultipartRequest cannot be resolved to a type
 
Similar Threads
Building problems
f:selectItem
Array
Migrating apps to a new server, getting errors
Tomcat deployement Problem SEVERE: Error listenerStart