Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I fix "BufferedReader cannot be resolved to a type"?

843840Jan 28 2008 — edited Jan 28 2008
Hello,

I'm writing a jsp page that read one file and output it. The code look like this:
<%
BufferedReader input = new BufferedReader(new FileReader("tech.csv"));
String line = "";
while ((line = input.readLine()) != null) {
   out.println(line);
}

input.close();
%>
and the error it keeps coming up is:
An error occurred at line: 9 in the jsp file: /FirstServlet.jsp
BufferedReader cannot be resolved to a type
What's the problem here? (I put the tech.csv file in the same directory as the jsp file)

Btw, I'm using tomcat 6.0.13.

thanks for the help,
ekb
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 25 2008
Added on Jan 28 2008
2 comments
7,048 views