roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MK <>
Subject Re: Passing variables via context, etc.?
Date Sat, 02 May 2009 09:40:55 GMT
I actually want the screen name of the logged in user.

I saw the example authorized user pluginmodel that comes with the source. I deployed it and
tried to use it but I don't seem to be able to access the variables. I tried the following
in the velocity templates for the frontpage and the jsp for adding entries:

debug full name $authenticated.user.fullName <br/>
debug screen name $authenticated.user.screenName <br/>

I also tried using the $user object:

debug full name $user.fullName <br/>
debug user name $user.userName <br/>

None of them worked. Can anybody point out what I am doing wrong? How can I access the user
model and the custom authenticated model setup with the plugin??


From: Henning Brune <>
Sent: Friday, May 1, 2009 11:26:09 PM
Subject: Re: Passing variables via context, etc.?

Hello Manu,

>        1. How do I find a logged in user's screen name. I do not seem to
> find that information in the published models?

I you want to display the screenname of the creator of a blog entry use '

But you are right. In the the roller template guide:

the attribute screenName is not documented with the 'User' model.

>        2. How can I pass information to roller via the context? How do I
> access the request object in a velocity template and in a JSP file?Thanks in
> advance,

If you want to access the request e.g. to use request parameters you should
take a look at a previous thread startin here:

It is (almost) not possible to make use of request parameters in roller
pages because of caching.


> Manu

Dipl.-Inform. Henning Brune

Universit├Ąt Bielefeld
Projekt BIS
Postfach 10 01 31
D-33501 Bielefeld

Die neue Homepage des BIS Projektes:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message