This is a java question not a Tomcat question. Iterate through the enumeration and add each object to a java.util.Vector. Then use the vector as you see fit. Or retrieve the ListIterator for the vector. A listiterator is like an enumeration but you can go both forwards and backwards.
Best regards, Richard ----- Original Message ----- From: "Graham Leggett" <[EMAIL PROTECTED]> To: "Tomcat User" <[EMAIL PROTECTED]> Sent: Sunday, December 30, 2001 2:41 PM Subject: cloning an Enumeration - how? > Hi all, > > Forgive what may be a stupid question: > > I am trying to retrieve all the locales from the Accept-Language header > in a request. To do this I use the following call: > > Enumeration locales = pageContext.getRequest().getLocales(); > > My problem is that once I have enumerated through this variable locales, > there is no way I can see to "reset" it so I can enumerate through it > again. > > I also cannot seems to find a way to clone this object, as Enumeration > is not a child of java.lang.Object, but an interface. > > Can anyone shed some light on the "correct" way to enumerate through an > Enumeration more than once? > > Regards, > Graham > -- > ----------------------------------------- > [EMAIL PROTECTED] "There's a moon > over Bourbon Street > tonight..." -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>
