Hi Milind,
Go to
www.oreilly.com.Search for ServletProgramming by Jason Hunter.Download the package com.oreilly.servlet. On that package
there is a class called MultiPartRequest by which you can upload
any file to the server.
The image file will be uploaded just by calling the constructor.
There are two overloaded constructors
1)MultipartRequest(ServletRequest request,
String saveDirectory,
int maxPostSize)
a)maxPostSize--- refers to file size(In your case it's image size)
b)save directory -- refers to directory shared in the server to which you want to upload
2)MultipartRequest(ServletRequest request,
String saveDirectory)
If you use the second constructor you can upload only to 1MB.
But if you use the first one You can upload upto 1GB by specifying image size in bytes.
Note:
specify in the form tag parameter as
enctype="multipart/form-data" .So that it handles MultiPart Request
Regards
Lala
------------------
Lala