> However, I am not sure
>if servlets can open up text files on the local server, and if this is
>feasible.
Sure it's possible and feasible. We just finished a prototype as a prelude
to using a relational database. We used a simple random access file, opened
in the init method, saved in a global variable, accessed in the doPost
method (see below). Simple, even primitive, but it works. Our biggest
problem was figuring out what directory on our hosted site our servlet was
expecting to find the file.
Regards,
Steve Mann
# # #
// in init
gDataFile = new RandomAccessFile ( gDataFileName, "r" );
// In doPost
gDataFile.seek ( 0 );
long filePtr = 0;
while ( filePtr < gDataFile.length ()) {
line = gDataFile.readLine ();
// do something.....
filePtr = gDataFile.getFilePointer ();
}
-------------------------------------------
Creative Digital Publishing Inc.
1317 Palm Street, San Luis Obispo, CA 93401-3117
-------------------------------------------
805.788.0138 805.593.3811 (fax)
[EMAIL PROTECTED] http://www.cdpubs.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html