The Artima Developer Community
Sponsored Link

Java Answers Forum
how to write to a file something from servlet

1 reply on 1 page. Most recent reply: Jul 24, 2002 2:04 PM by Don Hill

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
bighead

Posts: 2
Nickname: bighead
Registered: Jul, 2002

how to write to a file something from servlet Posted: Jul 24, 2002 8:40 AM
Reply to this message Reply
Advertisement
Hi guys,

I got some problem in HttpServlet

I propose to use FileWriter to write something (such as "hello world") to a file. However, no matter in init(), or response(), nothing could be write to the file.

Is there any suggestion?

Thanks


Don Hill

Posts: 70
Nickname: ssswdon
Registered: Jul, 2002

Re: how to write to a file something from servlet Posted: Jul 24, 2002 2:04 PM
Reply to this message Reply
> Hi guys,
>
> I got some problem in HttpServlet
>
> I propose to use FileWriter to write something (such
> as "hello world") to a file. However, no matter in
> init(), or response(), nothing could be write to the
> file.
>
> Is there any suggestion?
>
> Thanks

You need to look at the class File and FileOutPutStream, these will allow you to create and write to a file.

Flat View: This topic has 1 reply on 1 page
Topic: Do you really know Java? Previous Topic   Next Topic Topic: Listener class

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use