Now my question is what path should I specify in the servlet to access the image?
Specify in the servlet for access how?
If you want the servlet to open the image file using java.io.File and related methods - that works by operating system absolute paths .
If you want the servlet to write a HTML page with an IMG tag to fetch the image the url will have to be relative to the web application.
Bill