pradumb29
asked on
Class Cast Exception while finding all the session attributes
Hi,
I am using struts version 1.2.9 and am trying to get all the session variables to check for all the value with the following piece of code but am getting a class cast exception with it.
Any idea why this is happening ?
java.util.Enumeration allParameter = session.getAttributeNames( );
if (null!=allParameter)
{
while(allParameter.hasMore Elements() )
{
String attribValue=(String)sessio n.getAttri bute(allPa rameter.ne xtElement( ).toString ());
}
}
}
I am using struts version 1.2.9 and am trying to get all the session variables to check for all the value with the following piece of code but am getting a class cast exception with it.
Any idea why this is happening ?
java.util.Enumeration allParameter = session.getAttributeNames(
if (null!=allParameter)
{
while(allParameter.hasMore
{
String attribValue=(String)sessio
}
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.