AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problema con casting di Enumeration

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java (Italian)
View previous topic :: View next topic  
Author Message
mirko.calvaresi
Guest





PostPosted: Tue Dec 21, 2004 12:33 pm    Post subject: Problema con casting di Enumeration Reply with quote



Eseguendo questa pagina in Tomcat ricevo un errore abbastanza
org.apache.jasper.JasperException
il problema avvnete al momento del casting dell'oggetto
sessionN.nextElement();
Dove sbaglio?
Grazie a tutti
<%@ page contentType="text/html; charset=iso-8859-1" language="java"
import="java.util.*" errorPage="" %>
<%

Enumeration sessionN=session.getAttributeNames();
while(sessionN.hasMoreElements()){
String sn=(String)sessionN.nextElement();
out.println(sessionN.nextElement()+":"
+"
");

}


%>


Back to top
Giambo
Guest





PostPosted: Tue Dec 21, 2004 8:02 pm    Post subject: Re: Problema con casting di Enumeration Reply with quote



mirko.calvaresi wrote:

Quote:
Dove sbaglio?

Richiami due volte nextElement() all'interno del ciclo while.

--
Giambo - Occhio al filtro antispam _e_ alla whitelist !

Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.