First, thank you for your responses
Second, Yes, appending the folder to the path is no big deal but I'll explain more.
In my NetbeansProjects folder there's my application folder named ExpensesTest
under ExpensesTest there's Web folder and Build folder which has the built java after Netbeans deploys the application to the server
When I write the file it goes under Build/web directory
then when I try to access it from jsp page using getServletContext().getRealPath or application.getRealPath, the path would be:
which obviously doesn't exist.
Is there a way to move the generated file from Build to the root? or there's a way to access the file after the build? or it'll just work when the application is deployed?