oh, can I? Actually the servlet is going to save to the database and return
a page with some confirmation text etc. The link would appear as part of the
text returned by the servlet. The user can optionally click on the link and
save the file to his machine.
Raaj.

----- Original Message -----
From: Jim Richards <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, October 31, 1999 11:15 PM
Subject: Re: File read/write


> 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
>

___________________________________________________________________________
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