I've got a Java web application. I must produce a table and i'm using JDBC.

I have no idea during my list tag the number of values is going to be there, so for every value tag, I want a corresponding column during my table. These values are fetched from another application.

In order to produce a table getting n quantity of posts where n could be different each time.

<value>Contact No</value>
</list >

How do i accomplish this?

You need to use n rows to keep the values, not n posts. Posts are in some way 'fixed' inside a database, while you can easily add/remove/modify rows.

You have to cope with your table structure dynamically. Several solutions exist.

With JDBC, simply query Oracle and retrieve the posts of the Table.

String myTable = "FOO_TABLE";
String query = "Select COLUMN_NAME from USER_TAB_COLUMNS where TABLE_NAME=?";
PreparedStatement ps = conn.prepareStatement(query);
ps.setString(1, myTable);
Set<String> existingColumns = new HashSet<String>();
ResultSet rs = ps.executeQuery();

while (rs.next())

You've now learned which column is available or otherwise and you will ALTER your table as you would like.