I need to parse a number of files in my web application.
The files are sitting in a directory (called "edms") at the top level of my .war file. When I try to get a handle on the directory for processing I get errors as the resource returned is of vfszip protocol type.
For example, when I use MyClass.class.getResource("/edms") I get back something like "vfszip:C:/jboss/server/default/deploy/MyWar.war/edms".
If I then use this URL with File objects it fails as it cannot find the underlying directory and the files it contains.
I've looked at using the Spring ResourceUtils class but can't seem to get them to give me what I was which is to be able to :-
- Get a handle on the directory (within my .war file)
- Loop round each file in the directory - reading and parsing it's contents
Any ideas?
Thanks
Sarah