aspose file tools
The moose likes Java in General and the fly likes searching for a jpg file on local disk Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "searching for a jpg file on local disk" Watch "searching for a jpg file on local disk" New topic
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
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: searching for a jpg file on local disk
 
Similar Threads
jpg to BLOB and BLOB to JPG
Read and Write
Reading MDB file from a response
Help on SwingWorker
Change file extension (Very urgent)