I am using Tomcat/Apache on linux, but I never had any problems accessing
files straight from a servlet.

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
Costin L.
Sent: Wednesday, December 05, 2001 3:23 AM
To: [EMAIL PROTECTED]
Subject: output/input streams in servlets


    Hello!

    I have a problem regarding output/input streams in the servlet
enviroment. The problem I have is that, when you want to read something from
a file(locally for example) you have to make a URL or use the getRealPath().
As far as I know this is due to the fact that servlets (or any  of their
kind - JSP,Filters) have to run in a container, so any access outside the
container is forbidden. Isn't there a workaround on this?
    I know you can out a filter on your URL and make every request qualified
for it but I'm looking for something more direct and simple. I have also a
question for the PipedStreams...how can you make two independent java codes
to communicate with one another. Think of it as a dump, or a sink. An
application logs something and when the client connects it sends a flag to
the servlet, which start dumpping the data to the client - I'm reffering to
servlets which do not 'live' in the same container.
    And one last thing, has anyone so far worked with streams on windows and
managed on one side to write to a file, and on the other to read the content
w/o closing the file after each read.

    Thank you!



---
exploreaza Romania Online!
http://www.ROL.ro

___________________________________________________________________________
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

Reply via email to