File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

file upload with jsp

 
barnali chakrabarty
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:
I use jsp+tomcat+mysql.I have to upload file from the user's machine.I have downloaded jspsmartupload. But,I cannot make it work.Has anybody used it? Can anybody help me with the probable configuration for jspsmartupload in tomcat?
Thanks in advance.
 
Mouse Slider
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I used jspSmartUpload successfully.
1. Please make sure that ENCTYPE="multipart/form-data" in the form.
2. Please make sure that jspSmartUpload.jar (?) is in the right location in tomcat.
3. Please make sure that you did reference the examples which jspSmart provides.
Otherwise, if you don't mind, post your codes, please.
 
barnali chakrabarty
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the answer but I couldn't get your point of copying the jar file in tomcat.where should it be copied in Tomcat and where to find this specific 'jar' file? In fact I am facing a error when I am trying to run the sample example.the whole jspsmartupload folder is copied in the application folder and the class files of the Web-inf is copied in tomcat's web-inf folder.the error showed the the 'sample1.jsp' is as follows :
org.apache.jasper.JasperException: Unable to compile class for JSP/root/tomcat/tomcat3.2.3/work/localhost_8080%2Fjspsmartupload/_0002fjsp_0002fsample_00031_0002ejspsample1_jsp_0.java:15: Package com.jspsmart.upload not found in import.
import com.jspsmart.upload.*;

Can you please help?
Thanks again.
^
 
Biju Nair
Ranch Hand
Posts: 31
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try placing the jspSmartUpload's .jar file in tomcat's 'lib' directory. or put it in WEB-INF\classes folder. Both should work.
 
candy lau
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello. I also face the same problem error, likely the previous post message.
The error describe as below:
Package com.jspsmart.upload not found in import.
import com.jspsmart.upload.*;
According to your previous reply, try placing the jspSmartUpload's .jar file in tomcat's 'lib' directory. or put it in WEB-INF\classes folder.
however, I can not find *.jar files in jspSmartUpload folder. where to find it?
Thanks for your help...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic