You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by raghuprasad <ra...@gmail.com> on 2009/01/07 09:35:34 UTC
Few Doubts on Velocity, please clarify
Hi all,
Is it possible o write Scriplets (like in JSP) in Velocity?
Can we set request attributes in Velocity?
How to clear the Browser cache from velocity? below is the one which can be
done from JSP
<% response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0 response.setDateHeader
("Expires", 0); //prevents caching at the proxy server %>
Please let me know your thought, i am badly stuck up in some bug.....Raghu
--
View this message in context: http://www.nabble.com/Few-Doubts-on-Velocity%2C-please-clarify-tp21326797p21326797.html
Sent from the Velocity - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org
Re: Few Doubts on Velocity, please clarify
Posted by Claude Brisson <cl...@renegat.net>.
Hi.
Velocty by itself is just a template engine, it knows nothing about
HTTP. But if you use VelocityTools, or if you just put the HTTP response
into the context, you can write the same :
$response.setHeader("Cache-Control","no-cache"); ## HTTP 1.1
$response.setHeader("Pragma","no-cache"); ## HTTP 1.0
$response.setDateHeader("Expires", 0); ## prevents caching at the proxy server
Claude
On mer, 2009-01-07 at 00:35 -0800, raghuprasad wrote:
> Hi all,
>
> Is it possible o write Scriplets (like in JSP) in Velocity?
>
> Can we set request attributes in Velocity?
>
> How to clear the Browser cache from velocity? below is the one which can be
> done from JSP
>
> <% response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
> response.setHeader("Pragma","no-cache"); //HTTP 1.0 respocnse.setDateHeader
> ("Expires", 0); //prevents caching at the proxy server %>
>
> Please let me know your thought, i am badly stuck up in some bug.....Raghu
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org