This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
The getRealPath("/") method finds the actual file path to your web context root. Once you have this, you can determine any other path relative to the context root. You can then pass this path into your DAO method.
From servlet/action/jsp you can't get the absolute path. You need to specify this a parameter to the Container. You can use context-param in web.xml to specify the absolute path to your webapp directory and use ServletConfig to get the init parameter.