1 Reply Latest reply on Sep 16, 2002 7:03 AM by don_raka

    java.io.FileNotFoundException (trying to access file from JS

    don_raka

      Hi,

      I got this problem when trying to access file.
      This problem didn't occur on Resin nor Tomcat, etc.

      I'm using JBoss-3.0.2_Tomcat-4.0.4
      And I've deployed my webapp as a directory named "usingxtags.war"

      ...........
      <%@ page import="java.io.*" %>
      <%
      File file = new File("cdr.xml");
      FileReader fr = new FileReader(file);
      BufferedReader br = new BufferedReader(fr);
      String line = br.readLine();
      while(line != null)
      {
      out.print(line + "");
      line = br.readLine();
      }
      %>
      ...........

      What have I missed?

      Thanks in advance,
      Raka

        • 1. Re: java.io.FileNotFoundException (trying to access file fro
          don_raka

          Oh, I forgot the stack trace...

          Here's top the stack trace:

          .....
          java.io.FileNotFoundException: D:\Development-Kits\jboss-3.0.2_tomcat-4.0.4\bin\jndi:\localhost\usin
          gxtags\cdr.xml
          at org.jboss.net.protocol.file.FileURLConnection.connect(FileURLConnection.java:87)
          at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:96)
          .....

          Strange path...: "D:\Development-Kits\jboss-3.0.2_tomcat-4.0.4\bin\jndi:\localhost\usingxtags\cdr.xml"

          Best regards,
          Raka