I want to get the absolute path of Web content
folder in source code so I can retrieve another folder to upload file.
I tried ServletActionContext.getServletContext().getRealPath("images")
to get the folder image in source code.
Expected result should be:
"C:\Learning\Workspace\Eclipse\boxingsaigon\WebContent\images".
But it returns me where the web was deployed:
Actual result is:
"C:\Learning\Workspace\Eclipse.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\boxingsaigon\images".
Is there any way to do this?