struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Mikheev <mi...@bigfoot.com>
Subject Re: Struts tags help
Date Mon, 30 Jul 2007 20:20:49 GMT
Diego Ezquerro wrote:
> 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>");
>     %>


Just try this:
${user.username}

Depending on JSP version you're running it might work.
(I know it's not struts tags but no need to complicate things)

Oleg

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message