hey Spieler you said
> You could use multiple threads. This way you can still
> work on url's while one or the other thread is waiting
> for a respons
>
> regards
> Spieler
how do I go about that.
can you mail me an answer
I use
Statment stmt = con.createStatment("SELECT * FROM LinkTable");
ResultSet rs = stmt.executeQuery();
while(rs.next())
{
String str = rs.getString(2);
URLConnection conn =new URL(str).openConnection();
Reader rd = new InputStreamReader(conn.getInputStream());
EditorKit kit = new HTMLEditorKit();
Document doc = kit.createDefaultDocument();
doc.putProperty("IgnoreCharsetDirective", Boolean.TRUE);
// Parse the HTML.
kit.read(rd, doc, 0);
// Iterate through the elements of the HTML document.
ElementIterator it = new ElementIterator(doc);
javax.swing.text.Element elem;
while ((elem = it.next()) != null)
{
int cnt = 0;
st1 = new String();
SimpleAttributeSet s = (SimpleAttributeSet)elem.getAttributes().getAttribute(HTML.Tag.A);
if (s != null)
{
st1 = s.getAttribute(HTML.Attribute.HREF).toString();
System.out.println(st1);
}