*
The moose likes Java in General and the fly likes Storing data into excisting Data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Storing data into excisting Data" Watch "Storing data into excisting Data" New topic
Author

Storing data into excisting Data

Chennarao Marvatu
Ranch Hand

Joined: Aug 09, 2004
Posts: 32
posted October 30, 2004 06:48 AM
--------------------------------------------------------------------------------
Dear all..
I have a property file at client side .i have to get the
some properties from the server side and store them in the
excisting client properties file..please help me out in this .
i have done like this but not working..

HashMap versionUpdates=secReqObject.getVersionInfo();
String notificationServ = (String)versionUpdates.get("NotificationServerName");
String notificationUser = (String)versionUpdates.get("NotificationServerUName");
String notificationPass = (String)versionUpdates.get("NotificationServerPwd");

StringBuffer sb1 = new StringBuffer();
sb1.append("###NOTIFICATION SERVER");
sb1.append("\r\n");
sb1.append("NotificationServerName=");sb1.append(notificationServ);
sb1.append("\r\n");
sb1.append("NotificationServerUName=");sb1.append(notificationUser);
sb1.append("\r\n");
sb1.append("NotificationServerPwd=");sb1.append(notificationPass);
sb1.append("\r\n");
System.out.println("PROPERTIES FROM SERVER"+sb1);
FileWriter f = new FileWriter(iniFilePath,true);
f.write(sb.toString());
f.close();

2) one more question is i want to store the Login time in the Client
Property file how can i do that please send me code ..i have to FINISH
this task today itsele...I will be very grateful to u

Thanks in advance
chennarao


mchrao
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
Duplicating the core API is bad.

Read this:
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html


Tony Morris
Java Q&A (FAQ, Trivia)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Storing data into excisting Data
 
Similar Threads
Writing data into file from a String variable
i will be grateful to u
Storing data into excisting file
overwriting some part of file(UPDATING ONLY SOME PART)
writing data into a file only some part