Hello Pavlikus,

I got the same problem. I overcome this problem with very crude method.

use import jsp tag for  getting appropriate classes

First I create 1 instance with <jsp:useBean id="info" class=.. scope="session">

Then I reinitialise the info with session.getAttribute in JSP.

& then you can use your methods using JSTL or simple java code.

I wonder if

<c:out value="${info.user.login}"/>

this will run / not. Because I don't try like info.user.login though conceptually it sounds pretty good. In my case so I use single different methods such as info.user etc.

Please correct me if I am wrong some where. Because It is my learning curve.

Regards,

Nikhil Sidhaye.


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










--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to