• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
reading a txt file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

reading a txt file


  • Subject: reading a txt file
  • From: Andre Olivier <email@hidden>
  • Date: Thu, 6 Mar 2003 11:25:04 +0000

I have been working through the WO Application Construction kit and am
doing a tutorial on loading a text file with fortunes.  Adding it to
the project I need to add it to text Resources Suitcase (this must me
WO 4.5?) because I only see the Resources and Web Server Resources
folders in Proj Builder.  I added the file to the Resources folder via
"add files".

This is the code that access the file:
public class FortunePage extends WOComponent {
     protected Fortune fortune;

     public FortunePage(WOContext context)
     throws IOException, FileNotFoundException
     {
         super(context);
         fortune = new Fortune("fortunes.txt");
     }

     public WOComponent getNewFortune()
     {
         return null;
     }

}

After building the app, and clicking the fortune link  I recieve this
message:
Error:
java.io.FileNotFoundException

Reason:
fortunes.txt (No such file or directory)

Into which directory or folder do I need to copy this .txt file?

Thanks.


Andre Olivier

homepage.mac.com/olivieraj
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: copy WO application from one machine to the other
  • Next by Date: copy WO application from one machine to the other
  • Previous by thread: Re: copy WO application from one machine to the other
  • Next by thread: Signing JARs for Java cleint
  • Index(es):
    • Date
    • Thread