wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Blocking access to a file extension Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Blocking access to a file extension" Watch "Blocking access to a file extension" New topic
Author

Blocking access to a file extension

Fernando Vissentini
Greenhorn

Joined: Oct 06, 2003
Posts: 11
Hi, is there anyway to block the access to a file that has a specific extension in the tomcat configuration? for instance: I wanna block files with extensions EXE to be accessed.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61654
    
  67

Then why have them under your web app root in the first place?

You might get better responses if you informed us what the exe files are used for.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12823
    
    5
I suppose you could map the extension to a servlet that said "not allowed"
Look at the way *.jsp is mapped to the JspServlet in the default web.xml for an example.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Blocking access to a file extension