Wednesday, January 22, 2014

Parse HTML Table with Jsoup

Hi All,

Let me share with you the java code that helps me to extract data from html table. The code is based on the Jsoup library that you can add it to your project through Maven repository


or you add the Jsoup jar into the project build path (JAR available here : )

package org.tunindex.parser;


import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

public class MainClass {

 public static void main(String[] args) {
  Document doc = null;
  try {
   doc = Jsoup.connect("").get();
  } catch (IOException e) {

     for (Element table :"table")) {
         for (Element row :"tr")) {
             Elements tds ="td");
             if (tds.size() > 6) {
                 System.out.println(tds.get(0).text() + ":" + tds.get(1).text());


 Hope it helps you

Good night :-)

Monday, January 13, 2014

Server Tomcat v7.0 Server at localhost failed to start

Hi All,

Hope you are doing good.

A weak error, I faced today with eclipse when I was trying to deploy a java web application on Tomcat, occurred during Tomcat Startup. Following the error message shown in Eclipse:
Server Tomcat v7.0 Server at localhost failed to start

To resolve this problem, follow the instructions:

  1. Delete tmp0 folder inside
  2. Do the Eclipse Magic Steps: Clean the workspace and restart Eclipse
Let me know if you have more efficient solution

Good Bye :-)