hi Try
String username=(String)session.getAttribute("username"); You have explicitly cast it into String as it is Serialized. Regards Gary ----- Original Message ----- From: "John Ferguson Smart" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, December 05, 2003 7:13 PM Subject: Re: session taglib > Try something like > String username = session.getAttribute("username"); > or > String username = request.getSession(à.getAttribute("username"); > > > struts wrote: > > >In the Jsp i have: > > > ><sess:attribute name="userName"/> > > > >witch prints the username. Now i want something like: > > > ><% > > > >String username= <sess:attribute name="userName"/>; > > > >%> > > > >but that doesn't work. How can i assign the session variable to the String username ? > > > >Thanks ! > > > > > > > > > > > > > > -- > John Ferguson Smart, PhD > Directeur de Projet > Département informatique Communicante > AACOM > email : [EMAIL PROTECTED] > > --------------------------------------------------------------------- > AACOM - L'Informatique communicante > 120 rue du Marin Blanc - Z.I. des Paluds > 13685 Aubagne Cedex > tel : 04.42.72.65.69 - fax : 04.42.72.65.68 > Web : http://www.aacom.fr > --------------------------------------------------------------------- > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]