This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I need to develop an application who will serve as image sharing sort of tool. What i want is to upload all images of users in WEB-INF directory for security purpose, so that the images are not listed by users from URL. But on the same time, i want to display these images on a user specific page. How can i do this?
Second thing, I want to add a filter on images, so that I may track anyone (a website) which request of this image (request for image means user has uploaded image on my site and had given the image link on other site). So if an image is hosted in WEB-INF how can i add filter to it?
I want to do all this but i don't want to use any spring/struts/jsf thing. All i want to use is either Servlet or JSP.
The difference between <b>failure</b> and <b>success</b> is often being <b>right</b> and being <b>exactly right</b>.
I would start by writing a servlet that can stream an image from under WEB-INF to a browser. Because this will give you a central point of control for all image retrievals, there will probably b no need for the filter.
You can grant/deny access and log any traffic right from there. I have an an example app on my site with a servlet that streams images from under WEB-INF. http://simple.souther.us Look for SimpleStream.
Originally posted by Ben Souther: I would start by writing a servlet that can stream an image from under WEB-INF to a browser. Because this will give you a central point of control for all image retrievals, there will probably b no need for the filter.
You can grant/deny access and log any traffic right from there. I have an an example app on my site with a servlet that streams images from under WEB-INF. http://simple.souther.us Look for SimpleStream.
ok thanks. i'll look around for servlet stream. But i want to get the information (ip address etc)of the person who access that image, using my web applicatio url or given the link of that image on some other site
If you have a look at the methods on the request, you can find the client IP address. The http-referrer header (search google) should contain the url of the page where the image was loaded.