velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Closs <ja...@bitbull.com>
Subject Re: newbie - can't get VelocityServlet to read configuration file
Date Wed, 17 Aug 2005 08:25:51 GMT

On 15 Aug 2005, at 23:18, Nathan Bubna wrote:

> as for your original problem, something odd is going on (probably in
> your use of velocity) if the properties file is being read, but makes
> no difference.
>
> tell me, are you using the singleton (Velocity.blahblah) or not
> (VelocityEngine.blahblah) in your servlet?  and what is it that tells
> you that the properties are making no difference?

Hi everyone,

Firstly, thank you all for your very helpful responses.

I have made a good deal of progress - switched my code to using  
VelocityViewServlet and it now appears to be loading the properties  
file correctly. I think the problem was actually in my layout of  
web.xml where I had got <servlet> and <servlet-mapping> blocks in the  
wrong order (noob I know!)

I had one question regarding VelocityViewServlet and Velocity and the  
use of sessions in general. Am I right in presuming that the context  
used in VelocityViewServlet will not be consistent across page views  
within the same session, and if it is not is the 'best' way to access  
session attributes simply by $session.getAttribute("")?

I do not see myself setting session attributes from within the VTL  
itself but will have other servlets (that handle login/registration  
etc) that do this and then redirect to velocity templates. A simple  
example would be setting an error message attribute and then  
redirecting to a velocity template for the error page.

ps It's really a pretty simple project that I'm working on so I'm not  
really going to be looking at any more complex frameworks.

best

====

James Closs, Director, bitBull Ltd

http://www.bitbull.com

07771 991171

====


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


Mime
View raw message