velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claude Brisson <cla...@renegat.net>
Subject Re: accessing server environment variables in Velocity
Date Thu, 10 Aug 2006 12:04:17 GMT
If you are using the VelocityViewServlet (from the tools subproject),
you should be able to access those headers from VTL through the $request
object: 

$request.getHeader("User-Agent")
$request.remoteHost
$request.remoteUser
$request.getHeader("Accept-Language")
...

  Claude

Le mercredi 09 août 2006 à 15:20 -0500, Russell E Glaue a écrit :
> In a Velocity template, how do I access a server environment variable like
>    HTTP_USER_AGENT
>    REMOTE_HOST
>    REMOTE_USER
>    HTTP_ACCEPT_LANGUAGE
> 
> etc...
> 
> 
> -RG
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 


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