You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Sebastien BLANC <se...@wanadoo.fr> on 2004/05/07 11:26:56 UTC

[VELTOOLS] accessing Beans attributes

Hello, it's me again ;-)
So after working a while with veltag I decide to use the velocity tools in order to drop definitivly jsp ...
It almost work but I have a problem, quickly : I have a bean ("utilisateur") with a method ("getDroits()) which return 100 when I start my webapp. Then you have to log in, once you're logged ,the same bean's method returned "5" ; It's works with jsp and veltag but with my vm file it still return "100" , my vm file looks like that :
<html>
  <body>
le groupe d'utilisateur est : $u.getDroits()
  </body>
</html> 
In, my toolbox.xml I didn't specified any scope in order to use the default one (request), so if you have some ideas of what is happening it would be fantastic.
Best regards,
Sebi

Re: [VELTOOLS] accessing Beans attributes

Posted by Nathan Bubna <na...@esha.com>.
Sebastien BLANC said:
> Hello, it's me again ;-)
> So after working a while with veltag I decide to use the
> velocity tools in order to drop definitivly jsp ...
> It almost work but I have a problem, quickly : I have a bean
> ("utilisateur") with a method ("getDroits()) which return 100
> when I start my webapp. Then you have to log in, once you're
> logged ,the same bean's method returned "5" ; It's works with
> jsp and veltag but with my vm file it still return "100" , my vm
> file looks like that :
> <html>
>   <body>
> le groupe d'utilisateur est : $u.getDroits()
>   </body>
> </html>
> In, my toolbox.xml I didn't specified any scope in order to use
> the default one (request), so if you have some ideas of what is
> happening it would be fantastic.

it sounds like your bean isn't getting the hint that the person is logged in.
how that is supposed to be happening?  can you show us the code there?

Nathan Bubna
nathan@esha.com


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