In the PHP world it's common to create a directory called 'uploads' or something similar in the application folder. All uploaded files are then stored there, the database containing the relative paths to those files.
In the Java/servlet world however, I'm not sure what the common way to handle uploaded files is. Getting the path to a directory inside the application directory can be difficult, and the entire directory could be destroyed if the WAR file is redeployed. At the moment I'm storing uploaded files in the database as a blob, but this is not my preferred solution.
So my question is, where should I store uploaded files?