Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

enumeration from hashtable  RSS feed

 
Tom Boyce
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I'm writing a jsp page that will use filters to get specific data from a database. I have a hashtable called 'seachParams' and I want to see the contents of this hashtable which I have put into a session attribute as follows:
<%@ page import="java.util.*" %>
...
Hashtable searchParams = new Hashtable()
...
session.setAttribute("searchParams", searchParams);
Enumerations enum = searchParams.getEnumeration();
but I get the following error when trying to run:
C:\Tomcat4.1 \work\Standalone\localhost\Omni\jsp\statusReport2_jsp.java:141: cannot resolve symbol
symbol : class Enumerations
location: class org.apache.jsp.statusReport2_jsp
Enumerations enum = searchParams.getEnumeration();
Can anyone help?
 
eammon bannon
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no such class as Enumerations in the standard JDK, at least as far as I know.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65830
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you check to see if Enumerations is really a class name?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65830
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P.S. Hashtable? Passe. I'd investigate the use of HashMap.
 
Tom Boyce
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
duh! I noticed my error on the spelling! Also, for anyone who may attempt this, its:
Enumeration sr_enum = searchParams.elements();
while (sr_enum.hasMoreElements())
System.out.println("searchParms element = "+ sr_enum.nextElement());
Thanks for responding!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!