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()));
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact