How to get gif image "filename" using servlet.
Hi,
I have created servlet using netbeans, and running on browser, now since I am new to servlet, so I don't have a knowledge about servlet.
Now my problem is :
I have folder in Quote:
C:\\cards\\playingcard
. In this folder have 52 gif images. Now I want to get all the name in my servlet.
Like one gif image name is .
This name I want to display in servlet. I have searching , and try to solve my problem, but still not solving, Please help me....how Can I solve this problem.
I don't want to upload image,only I want to name like "2c.gif" , "3c.gif" on my console, and so on.....
I have create a simple class its working properly but not this code working on servlet.....
:frusty:
Re: How to get gif image "filename" using servlet.
If you want to get all the file in a directory, check the java.io.File class. There is a method that will returns you an array of files available in the specified directory.
Re: How to get gif image "filename" using servlet.
Quote:
Originally Posted by
wsaryada
If you want to get all the file in a directory, check the java.io.File class. There is a method that will returns you an array of files available in the specified directory.
Sorry, I have created servlet context listener now I want to get .gif image from a folder which is on WEB directory of net-beans on servlet and store into the list with card image and also allot the integer value of each card, please help me how can I do this on ServletContextListener.
Re: How to get gif image "filename" using servlet.
What happened when you tried using methods available in java.io.File?