Thanks Jim

I had considered the easiest route of writing the headers from the controllers, but 
not every page needs these headers set, thus, I would need specific controllers for 
these pages, even if an existing controller exists. This felt awkward.

I'll take a look into your idea of a 'custom "header setting" transform' - does any of 
the example code or optional packages source demonstrate this?

Cheers
David


-----Original Message-----
From: jim moore [mailto:[EMAIL PROTECTED]]
Sent: 29 September 2002 04:45
To: [EMAIL PROTECTED]
Subject: RE: [Mav-user] Requirement: Setting HTTP headers


The ControllerContext has the HttpResponse in it, so by far the easiest
thing to do would be to simply write these headers to the response in
your controller. Alternately, you could modify the views you use to take
parameters to set headers, or define a custom "header setting" transform
that you could put last in the transform chain.

--jim

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of David Cuthill
Sent: Friday, September 27, 2002 4:31 AM
To: [EMAIL PROTECTED]
Subject: [Mav-user] Requirement: Setting HTTP headers


Hi all,

I'm a recent convert to Mav which I am very impressed with.

I have a requirement to be able to write specific HTTP headers
(Cache-Control, Pragma & Expires). I cannot see how to do this in Mav at
present, but with a pointer in the right direction I can try to add this
feature to Mav for my current project.

Presumably, It would be best achieved in the 'view' phase and envisage
the maverick.xml file containing something like:

<command name="foo">
        <controller class="ctl.foo"/>           
        <view name="success" ref="bar">
                <meta cache-control="no-store" pragma="no-cache"
Expires="0"/>
        </view>
</command>

Any thoughts & guidance appreciated.

-DavidC


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]

Reply via email to