Hi there,
    I hope following lines will gelp you.
gargi

try
{
     OutputStream output = new FileOutputStream(iFilePath+ iFiename);
      ObjectOutputStream os = new ObjectOutputStream(output);
     os.writeObject( iParam );
      os.flush();
     os.close();
      output.close();
 }
 catch(Exception e)
 {    errOut.println( "The writing was =  " + e);
     // e.printStackTrace();
 }

Gaurav Kishore wrote:

> Hi,
> I have a servlet with the following piece of code :
>
> ##StartCode################
>
> public void doGet (HttpServletRequest req, HttpServletResponse res)
> throws ServletException, IOException {
>                 ServletOutputStream out = res.getOutputStream();
>
> ##EndCode###############
>
> I want to store this output stream in a file. I know I have to use
> FileOutputStream. But I do not know the exact syntax. Do I have to cast
> this stream into FileOutputStream or do something else.
>
> Any help is highly appreciated.
>
> TIA
> Gaurav
>
> ___________________________________________________________________________
> 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

___________________________________________________________________________
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