Two Laptop Bag*
The moose likes JSP and the fly likes web.xml settings for preventing direct access to image by its URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "web.xml settings for preventing direct access to image by its URL" Watch "web.xml settings for preventing direct access to image by its URL" New topic
Author

web.xml settings for preventing direct access to image by its URL

Shruti Sagar Mohanta
Greenhorn

Joined: Nov 22, 2012
Posts: 3
Hello

I have a folder images in my web application which I want to secure by preventing direct URL access to it (which is known to most of my application's users). But simultaneously the JSP files in my application should be able access the images inside images folder.

I know how to use .htaccess for this purpose but I don't know how to achieve this by settings in web.xml for an application.

Thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60732
    
  65

You cannot protect the images. If the browser cannot access the images, how can it display them?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Shruti Sagar Mohanta
Greenhorn

Joined: Nov 22, 2012
Posts: 3
the way images can be protected by .htaccess (preventing direct URL access)
isn't there any similar way for java application?
sudheer yathagiri kumar
Ranch Hand

Joined: Mar 22, 2011
Posts: 35
How can you display the images in jsp...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: web.xml settings for preventing direct access to image by its URL
 
Similar Threads
Blocking access to images
blocking access to images
blocking access to images
How to restrict access of images folder when application made using JSP
How to restrict access to image folders