• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

searching for *orm.xml files

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Could you please give some advice on how to search for all the *orm.xml files in "WEB-INF"?

basically want to find: *\WEB-INF\*orm.xml

any suggestion is appreciated.

thanks
 
Sheriff
Posts: 7134
1360
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can do it with general file manipulation functions on java.io.File class. However, you should take it a note that attempting to do so makes your web application less portable and less deployable. You can't be certain that you will always have the access to the underneath file system. If you application gets WAR'ed, or if the presence of a security manager prevents access to the file system, your search operation is likely to be failed.

A better way is to rethink why you really need to have such operations to be performed. If you are the one who develops your web application, you should already know the exact file names, so you can fetch them through getResourceAsStream(). If those files are something you are designed to be generated and persisted at the run time of the application, you are probably having a bad architecture.
 
reply
    Bookmark Topic Watch Topic
  • New Topic