Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Struts tags help

Diego Ezquerro

2007-07-30

Replies:

Hi to everybody.

I'm developing a web app using struts and wanna know if there is a way to get the session attributes using struts tags.
What i want to do is something like this (within a jsp page):

<%
  User user = (User)session.getAttribute("user");
    out.println("<b>Welcome " + user.getUsername() + "!</b>");
  %>

Gettin' the user attribute and then have it available in the whole page.
I've tried <bean:parameter .../> but it doesn't work fine.

Thanks for the answers.



__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
Regístrate ya - http://correo.espanol.yahoo.com/
©2008 junlu.com - Jax Systems, LLC, U.S.A.