Which scope you want the data in depends on your needs (request, session, application, database).

At 11:23 PM 6/20/2004, javen fang wrote:
this is in struts mailing list, and you MUST be using
Struts

So in struts, we avoid to use scriptlets in JSP page.
All your data is prepared in struts Action



--- Pavlikus <[EMAIL PROTECTED]> wrote:
> Hello all.
>
> <%
>   UserSessionInfo info = (UserSessionInfo)
>
>
session.getAttribute(UserSessionInfo.USER_SESSION_INFO_KEY);
>
>   <!-- Print user's login ok -->
>   out.println(info.getUser().getLogin());
> %>
>
> Later on page:
>
> <!-- Prints empty strings instead of user's login
> -->
> <c:out value="${info.user.login}"/>
> <c:out value="${info.user.role.title}"/>
>
> Please tell me where my mistake.
> Also, is there ways to avoid scriptlets on my jsp?
> I use <jsp:useBean> but it always try to create new
> instance
> of UserSessionInfo, instead of find it in session.
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>




__________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
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]



Reply via email to