I\'m stuck with sort of a configuration issue I think. I need to protect
a folder which is within my actual tomcat application from access from
a certain IP range.
The Tomcat Valve can be applied to the whole Engine, the Host or a specific Context (webapp). You have to use it for you whole app, not specific path or directories.
You should set it in your META-INF/context.xml or your context fragment in conf/Catalina/[host] directory. For example,