Link to home
Start Free TrialLog in
Avatar of modsiw
modsiw

asked on

tomcat - hide files and directories that start with "." on windows

I have tomcat 5.5 running under windows. It will deliver files/folders that start with a ".". How can I prevent this?
Avatar of Bryan Butler
Bryan Butler
Flag of United States of America image

I don't think there's an easy way to do this.  If it was an extension, there are config options for that, but to ignore files that start with "." is not a usual thing.  If you new the complete filenames, then that would be easy.  Or you could create a script to add all the .* files to the config, but it would be static and need updated anytime files changed.  Of course you can hide all files by turning directory browsing off.  
Also, unix systems ignore filenames that start with "." by default.  
Avatar of modsiw
modsiw

ASKER

Unfortunately the files & directories that need to be hidden are predictable. (eg, folders name .svn)
Avatar of modsiw

ASKER

>>Also, unix systems ignore filenames that start with "." by default.  
yep, stuck in windows though
Avatar of Mick Barry
> (eg, folders name .svn)

you shouldn't be deploying those in the first place

Are the .files actually needed?  If not then just don't deploy them
Avatar of modsiw

ASKER

In some cases they are. There are configuration files for the app its self.

Yes, I know that its bad form in the first place and actions are underway to fix it, eg war files. But as a stop gap measure, hiding them would be nice.
>There are configuration files for the app its self.
Put them into your web app's WEB-INF folder.  They won't be seen be browser there.
Avatar of modsiw

ASKER

>Put them into your web app's WEB-INF folder.  They won't be seen be browser there.
Not an option. They have to be in the same directory as the .jsp pages .

Again, we have a proper long term solution. Just looking for a stop-gap.
>They have to be in the same directory as the .jsp pages .  
Are the JSPs using the files ?
Please post an example showing how the files are called.

ASKER CERTIFIED SOLUTION
Avatar of Bryan Butler
Bryan Butler
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial