× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I am running Apache and Tomcat on the 400.

My directory structure looks like this:

www
   myInstance
      webapps
         myApp
            WEB-INF
               classes
                   com
                      myPackages
                         package1
                         package2
                         ...
                         packageX

I have no trouble getting my servlets to use classes in my packages, but one
of the classes is giving me fits.  In one of the packages, I have a class
that reads a text file and outputs the text, line by line, to a web page.
The problem is that no matter where I put the text file the class throws
this exception:  "FileNotFoundException:No such path or directory".

I do this in a stand alone Swing application with no trouble.  In that case,
you must put the text file in the same directory as the class that calls the
package.  In this case that would be the "classes" directory.

I have placed the file in myApp, WEB-INF, classes, and the package
directory, but it is never found.

I have tried accessing it using filename, /filename, myApp/filename, and
/myApp/filename.

I have stopped and restarted the Apache Server after ever change.

I have checked case sensitivity of the file name.

Does anyone out there know what I'm doing wrong?  If not, does anyone know
where I can go to find out?  Does anyone else know a way to do a simple
include in a Servlet (not a JSP)?

TIA,

Joel R. Cochran
Director of Internet Services
VamaNet.com
(800)480-8810
mailto:webmaster@vamanet.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.