reading a txt file
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.