What  is the path you write it in? Where sits the property file?

On 4/4/08, unka_hahrry <[EMAIL PROTECTED]> wrote:
>
> I call this method from inside a WebPage:
>
> public static void setNewText(String path, String textId, String neuerText)
> throws IOException {
>               
>               ... getting old text as StringBuffer "alt" ...
>               
>               //create new String from content of .properties file
>               String neu = alt.replace(start, ende, neuTextTeil).toString();
>
>                           File output = new File(path);
>                           BufferedWriter out = new BufferedWriter(new
> FileWriter(output));
>               
>               try {
>                       out.write(neu);
>                   }
>                   finally {
>                       out.close();
>                   }
>
>       }
> That's all. The .properties file will be changed correctly, but the new
> content will only take effect if I open the .properties file with an editor
> and save it, but the overwriting process won't be recognized.
>
>
> Johan Compagner wrote:
> >
> > thats very strange
> > writing  a file in an editor or save it through java that shouldn't matter
> > But are you constantly writing properties file from inside the webapp?
> >
> > johan
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Writing-to-.properties-files-and-make-changes-happen--tp16447118p16484561.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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