Solved it.

Needed \r\n to terminate line instead of just \n

-Duncan

Duncan wrote:

> I am trying to write a list into a file, but when I read the file after
> it has been written it is always missing the first one or two lines.
> When writing the file, I also output to the screen, and all the lines
> appear on the screen.
>
> Any ideas? , code is listed below.
>
> Cheers, Duncan.
>
> FileWriter fwFreeList = new FileWriter(sFreeListPath + "/hello.txt");
>     String sValues[] = request.getParameterValues("freeList");
>     for (int i=0; i < sValues.length; i++)
>     {
>        out.print(sValues[i] + "<br>");
>        fwFreeList.write(sValues[i] + "\n");
>     }
>     fwFreeList.close();
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to