Reading a File From the Same Directory as the Servlet’s Class File

To access a file that is kept in the same directory as the servlet, you can do either of the following things:

1. Hard-coding the file path:

 FileReader fr = new FileReader(

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: