• Post Reply Bookmark Topic Watch Topic
  • New Topic

searching for a jpg file on local disk  RSS feed

 
anuja Edathu
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
anuja Edathu
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!