Hi all , I have a servlet program, this program will get a user name and password from a web page. I need to check the user name and passsword entered by user with a data file has all user names and passwords. the thing is I know how to search and check if the name and password in data file or not . my problem is my servlet shows a message to me says
"description The server encountered an internal error () that prevented it from fulfilling this request.
java.io.FileNotFoundException: admin.txt (The system cannot find the file specified)
java.io.FileInputStream.open(Native Method)
java.io.FileInputStream.<init>(FileInputStream.java:106)
java.io.FileReader.<init>(FileReader.java:55)
InputServlet.doGet(InputServlet.java:15)
InputServlet.doPost(InputServlet.java:69)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:420)
org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:170)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.27 logs.
Apache Tomcat/5.5.27
although I have put the compiled program with the file under Classes directory, I get the same error
and I have tried to put the program + its class + the file , under Classes Directory , I get the same error (exception)
please help!