Hi Robert!
There may be two reasons for the servlet not reading the file.
1 It is not getting the absolute path of the file.
You can provide the absolute path of the file.
2. It is quite possible that there is a version difference if JDK between your
development environment and Servlet hosting environment(Web Server). Quite
possible that you are using Readers for file reading and your Web Server has
1.1.7 or 6 and not supporting Readers. To avoid this situation, U can use
Streams.
It will be quite helpful, if u mention the development environment and the
deployment environment u r using.
Regards
Shahzad
Robert Ziel <[EMAIL PROTECTED]> on 08/22/2000 07:21:10 PM
Please respond to "A mailing list for discussion about Sun Microsystem's Java
Servlet API Technology." <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc: (bcc: Shahzad Mahmood/CresSoft)
Subject: Servlet AND FileAccess
hi,
can you explain to me how a servlet access a file
if i place a file in the same directory as my servlet should this work...
or should i allways place my file in a classpath:
if so how do i do this right.....
i have a servlet which invokes a function this function invokes in its turn
another function the third function reads
3 arrays from an binairy file
and uses a second file to randomAccess a certain point and reads two bytes...
if i use the main it works fine
but if i use a Servlet it does not work....
so my quess it must be in the fileAccess.
so if you could explain to me some about this topic...
i would appreciate this very much...
regards Robert
___________________________________________________________________________
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
___________________________________________________________________________
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