i uploaded an image using apache's class library at my localhost. now i want to access this image directly using ImageIO.read(URL) method by passing the url of that image.
the image is located at the directry pointed by getServletContext.getRealPath() method(as i uploaded it using servlet). and in this case it is E:\java\UASProject\build\web\uploadedimage\image.jpg. the uri for a servlet located at E:\java\UASProject\build\web\web-inf\classes is http://localhost:8084/UASProject/storeimage. i tried to read image file using this url http://localhost:8084/UASProject/uploadedimage/image.jpg.
i dont know wheather i am doing right or wrong but this way is not working.
so please tell me what url should i use to acces a file when it is located at servlet context path?