This particular code is uploading the file at /bin folder of tomcat server, but i want this to upload in webapps. i can't understand how it is storing in /bin. please suggest some solution.
balakrishnabilla billa wrote:please give the correct path where you wanted to create a file in server
But, of course, hard-coding the path as a string would be a very bad practice indeed.
Rather, determine the location programmatically.
Also, do you really want to upload a file into the web app? Really? What happens when you have to redeploy and update?
But as Bear has said
do you really want to upload a file into the web app? Really? What happens when you have to redeploy and update?
where should i upload the file then...?
One more thing i want to ask --- Is there any easy code that i can understand and works accordingly for uploading file?
i dont know actually how to upload file....
please help and give some code snippet for uploading a file....
I have searched JSP FAQ but the link provided :
On the client
If you want to upload files in conjunction with Commons HttpClient, this introductory article tells how to use FileUpload in conjunction with the Commons HttpClient package.
is not working.............
Jatin sachdev wrote:cant i use simple input sream to upload file...?
The input stream contains a multipart request which is a pain in the rear to parse. No one in their right mind would try to reinvent the wheel when a number of perfectly good libraries that have already solved the problem exist.
Why do you need to write a file to authenticate a user?U