Hallo,

I've found it after looking at the api docs. VelocityServlet has a method "setContentType()". In this method you can set the content type, but also add several other headers to the http header. It's a little dirty but i works :-)

Best regards,
Twan

At 14:08 27-3-2003 +0100, you wrote:
Hello,

Is it possible to add a http header to the response object when using VelocityServlet? I searched the archives and found to add http header with the template <http://www.mail-archive.com/[EMAIL PROTECTED]/msg06615.html>. But that isn't exactly what i wanted, i want to add a header in the servlet, for example in the handleRequest() methode of VelocityServlet.

I tryed something like :

((HttpServletResponse)ctx.get(VelocityServlet.RESPONSE)).addHeader("header: ", "val");

But that didn't work. Am i'm on the wrong path?

Best regards,
Twan


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to