velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Holt <jackch...@gmail.com>
Subject Setting contentType in a Velocity Template [was Re: How do I pre-populat text, not fields, in a form?(Making forms dynamic)]
Date Thu, 07 Jul 2005 18:16:16 GMT
I need to set the contentType in a velocity template so it will load
the template in excel.  I've done this in the past by passing the
HttpServletResponse as $resp and using code like:

$resp.setContentType("application/vnd.ms-excel")

But I have a need to access the the response without having to pass it
from the controller.

I saw the below post (which actually talks about request) but I'm not
using struts (I'm using Spring Web Flow actually).

On 7/7/05, Simon Christian <simon@stoutstick.com> wrote:
.... If you're using a
> VelocityStruts setup, the request is automatically exposed within the
> template context, as $request
> 
> - simon

What is the best way to do this?

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