Hashmap problem in JSP

Using hash map in JSP page i hav added the code

<%@page import="java.util.*%>

java.util.HashMap hmFiles = new java.util.HashMap();

getFiles(ftp,hmFiles,jobNoTest);

But it gives error as --

Generated servlet error:

java.util.HashTable cannot be resolved or is not a type

[315 byte] By [Meghnaa] at [2007-11-27 10:53:44]
# 1

HashTable != HashMap.

Also, the HashTable doesn't exist. Hashtable does.

BalusCa at 2007-7-29 11:45:56 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

ohh exremly sorry..

I know the basic difference between HashTable & HashMap

HashMap hmFiles = new HashMap();

if (hmFiles.isEmpty()){out.println("Not File avaliable ......");}

else{

Set set = hmFiles.entrySet();

System.out.println("@@1");

It=set.iterator();

//Enumeration entry2=v2.elements();

//File f1=null;

//String st=;

while (It.hasNext()){

//st=;

Map.Entry me = (Map.Entry)It.next();

System.out.println(me.getKey() + " : " + me.getValue() );

}

}

am i going right..?

Thanks in advance,

Meghna

Message was edited by:

Meghna

Meghnaa at 2007-7-29 11:45:56 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...