At 06:45 PM 31/10/99 -0800, Rajendra Mishra wrote:
> I need some help. I am trying to write a file on the server in my servlet and then
>give this link to the client. The problem is I do not have the absolute path to write
>the file. I just have the server name and optionally a directory where I would like
>to create/write the file. Can somebody please advice me how I can read/write a file
>on the server? I hv not tried it but would ServletContext.getRealPath() work? Or
>should I write a path(which I do not know!) in the properties file and use it?
why are you trying to write a file that's going to be served to the user, you can open
a stream and pass the file out to the user, and set the mime type as you are going ...
--
Subvert the dominant paradigm
http://www.cyber4.org/members/grumpy/index.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