Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bad file descriptor of tomcat

Status
Not open for further replies.

koeicjm

Programmer
Sep 12, 2001
73
0
0
JP
My servlet have code like this

BufferedReader in = new BufferedReader( new FileReader( objIDpath ) );
ref = in.readLine();

it seems when I call the servlet many times , the tomcat will get a "bad file descriptor" error , but if I add the
in.close();
it will run fine. must I close it ? and how can I set the tomcat to avoid it?
 
You should close input/output streams when you are finished with them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top