This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Blocking access to a file extension

 
Fernando Vissentini
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65109
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic