dcsimg

Can I get the path of the current servlet where it lives on the file system (not its URL)?

Anthony Marsh

Try using:

request.getRealPath(request.getServletPath())
An example may be:
 out.println(request.getRealPath(request.getServletPath()));