Just open up a new BufferedReader( new FileInputStream
("/path/to/file.txt"))) and you should be fine :)
If you want to see some source code that does this type of thing, look
at our RandomQuote servlet at http://www.coolservlets.com
Where to store the file is a totally different issue... but it sounds
like you might just be able to hard code a place on the file system for
your customer.
Good luck!
-Matt Tucker
"G. Naik" wrote:
>
> A customer of mine, has some data that they want to put on the web. It is
> very small in size...but their web hosting has no database capabilities. I
> was thinking about storing the data in local text files on the server and
> then reading the files in and generating the html. However, I am not sure
> if servlets can open up text files on the local server, and if this is
> feasible.
>
> The data is updated every two weeks, but I'd rather update the text files,
> than updating static html pages.
>
> Any input and help will be greatly appreciated.
>
> -g-
> --
>
> ___________________________________________________________________________
> 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
--
-------------------------------
Matt Tucker
[EMAIL PROTECTED]
http://cs.uiowa.edu/~matucker
See CoolServlets:
http://www.coolservlets.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