It's strongly recommended that you don't use "getRealPath" in your web applications. Sure
Tomcat expands wars out to real files, but there are several servers which run your application straight from a war file.
All servers should provide a temporary working directory to each web application, to use when you need to store things (uploaded files, temporary configs etc.), and
you should load other files using getResource()