You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "Bozic, Stefan (FF)" <st...@t-systems.com> on 2002/09/20 09:45:27 UTC

Add HTTP-Resonse-Header Information

Hello there,
i try to add some additional information to the Http-Response-Header.
I use a Velocity-Template with the following expression

$data.getResponse().setHeader("Cache-Control", "private")
$page.setHttpEquiv("Cache-Control", "no-cache")
$page.setHttpEquiv("Pragma", "no-cache")

All what I got is an exception inside the Tomcat-Console.

ASTMethod.execute() : exception invoking method 'setHeader' in class
javax.servlet.http.NoBodyResponse : java.lang.Illeg
alAccessException: Class org.apache.velocity.runtime.parser.node.ASTMethod
can not access a member of class javax.servle
t.http.NoBodyResponse with modifiers "public"

Any Idea whats going wrong??