file upload on server
1 posts in topic
Flat View  Flat View

Posted By:   dinesh_kumar
Posted On:   Tuesday, September 25, 2007 09:06 AM

i m working on a small project for inventry management system
i m not so expert in java
i want to make a page from which i can upload files(specially image file)on server
please send me the whole code(as simple as possible)using jsp and servlet.
i m using tomcat server
please help i'll be thankful to u

Re: file upload on server

Posted By:   anita_singh  
Posted On:   Thursday, September 27, 2007 05:41 AM

Jsp Page........

Servlet Code......

try {

String path="////";

MultipartRequest fileUploader;
fileUploader= new MultipartRequest(request, path, 10 * 1024 * 1024,true);
File file = fileUploader.getFile("uploadTerms");
String generatedFileName=s1;

String FileNewName=path+"/"+generatedFileName;

boolean b1=file.renameTo(new File(path+"/"+generatedFileName));
File objFile = new File(path+"/"+generatedFileName);
catch(Exception e)


About | Sitemap | Contact