Hi, I am new at this...
I am trying to display data from a text file to a JSP file and I'm using BufferedReader to do this but having problems getting to the file. Which directory should I put the text file? Should I add anything to web.xml to reference to it? Here is the error I am getting... Any help is appreciated.
09:32:58,655 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 4 in the jsp file: /PPOS.jsp
BufferedReader cannot be resolved to a type
1: <%@ page language="java" contentType="text/html;charset=UTF-8"%>
2:
3: <%
4: BufferedReader input = new BufferedReader(new FileReader("c:\\InputData.txt"));
5: String line = "";
6: String strOutputDir="";
7: String PriceBookVal="";
An error occurred at line: 4 in the jsp file: /PPOS.jsp
BufferedReader cannot be resolved to a type
1: <%@ page language="java" contentType="text/html;charset=UTF-8"%>
2:
3: <%
4: BufferedReader input = new BufferedReader(new FileReader("c:\\InputData.txt"));
5: String line = "";
6: String strOutputDir="";
7: String PriceBookVal="";
An error occurred at line: 4 in the jsp file: /PPOS.jsp
FileReader cannot be resolved to a type
1: <%@ page language="java" contentType="text/html;charset=UTF-8"%>
2:
3: <%
4: BufferedReader input = new BufferedReader(new FileReader("c:\\InputData.txt"));
5: String line = "";
6: String strOutputDir="";
7: String PriceBookVal="";
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)