| Author |
searching for a jpg file on local disk
|
anuja Edathu
Ranch Hand
Joined: Sep 09, 2005
Posts: 84
|
|
Hi all, for a particular application i want to add one jpg file from the local disk to the image folder, which is under tomcat/webapps/application . Can any one help me finding a solution for geting a file browser on clicking the search button so that i can chose the one i want and put in the required place. Thanks & Regards Anuja K.
|
 |
Arun Boraiah
Ranch Hand
Joined: Nov 28, 2001
Posts: 233
|
|
Is your application is web application or desktop application? 1. If it is web application you need to use HTML page similar to the one given below for file browsing and use file upload packages and upload the file. <input type="file" name="somename" size="chars"> 2. If it is a desktop application and using swings etc, you should have file browse botton in it API. Take the location of the file and in your java class use java.io package copy the file to location passed as input parameter.
|
Sharing is learning
|
 |
anuja Edathu
Ranch Hand
Joined: Sep 09, 2005
Posts: 84
|
|
Thank you Arun i am doing a web application i , can you tell me how to write a jpg file in to the disk? Regards , Anuja K
|
 |
 |
|
|
subject: searching for a jpg file on local disk
|
|
|