one way is to export the address book to CSV file format......u can then parse this CSV file using either the regexp package or the custom jdk1.4 classes....even better if u know a perl guru tell him to write a script to get the job done..after all TMTOWTDI:-))))))
try this sample class... from JGURU... How can I correctly parse CSV ( comma separated values ) files? StringTokenizer doesn't seem to fit many conditions. Location: http://www.jguru.com/faq/view.jsp?EID=809266 Created: Mar 23, 2002 Author: Joe Sam Shirah (http://www.jguru.com/guru/viewbio.jsp?EID=42100) Question originally posed by steven mccartey (http://www.jguru.com/guru/viewbio.jsp?EID=792888 Ian Darwin has two classes ( CSV.java and CSVRE.java ) to handle CSV files in his Java Cookbook, including a way with regular expressions. You can download the code from his site, probably best to do so from the examples by chapter ( see Chapter 3, "Strings and Things" ) page. Not a bad idea to buy the book, either. Comments and alternative answers use this class Author: Amardeep Singh (http://www.jguru.com/guru/viewbio.jsp?EID=811616), Mar 25, 2002 import java.util.*; public class WStringTokenizer extends StringTokenizer { private String tbt; private String d; private int startpos=0; public WStringTokenizer(String str,String delim) { super(str,delim); tbt=new String(str); d=new String(delim); } public int countTokens() { int tokens=0; int temp=startpos; while(true) { try { nextToken(); tokens++; } catch(NoSuchElementException e) {break;} } startpos=temp; return tokens; } public boolean hasMoreElements() { return hasMoreTokens(); } public boolean hasMoreTokens() { if(countTokens()>0) return true; else return false; } public Object nextElement() { return (Object) d; } public String nextToken() throws NoSuchElementException { int result=0; String s; if(startpos>tbt.length()) throw(new NoSuchElementException ()); result=tbt.indexOf(d,startpos); if(result<0) result=tbt.length(); s=new String(tbt.substring(startpos,result)); startpos=result+d.length(); return s; } public String nextToken (String delim) throws NoSuchElementException { d=delim; return nextToken(); } } Another CSVReader Author: Roshan Shrestha (http://www.jguru.com/guru/viewbio.jsp?EID=130068), Mar 26, 2002 Ian Darwin's class parses the file one line at a time. Many times, a field may span multiple lines. I think a better class is the CSVReader described in http://www.objectmentor.com/resources/articles/tfd.pdf. As an added bonus, it also desscribes unit testing with JUnit! CSV Libraries Author: Stephen Ostermiller (http://www.jguru.com/guru/viewbio.jsp?EID=576685), Apr 17, 2002 There are free open source libraries for parsing and printing CSV files available here: http://ostermiller.org/utils/CSVLexer.html ravi ----- Original Message ----- From: "RNivas" <[EMAIL PROTECTED]> To: "Tomcat-User" <[EMAIL PROTECTED]> Sent: Monday, June 24, 2002 11:36 AM Subject: Reading Address Book My Apologies to start a new discussion! I have one application running on tomcat (Servlet+JSP). Tomcat+winNT4.0 All my clients running on win98 or win2000. I want to develop one utility to read there Email address book (from Client) and save that address book on database(server). So that in future they can use the email list on web it self. If anyone have idea please share with me. Regards Rnivas -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>