Response is there to provide an abstraction for e.g. portlets, and other types of requests. As long as you are working in a web container and don't install or use extensions (that I am unaware of exist), casting is fine.
Martijn On Wed, Mar 21, 2012 at 9:56 AM, Martin Grigorov <mgrigo...@apache.org> wrote: > On Tue, Mar 20, 2012 at 8:12 PM, eugenebalt <eugeneb...@yahoo.com> wrote: >> As I wrote in other messages, I have a custom widget that implements >> IResourceListener. >> >> I override onResourceRequested(). When rendering the resource I need to set >> the ContentLength of the response that sends the binary data to the client. >> Where is the best place to do it? I have access to >> getRequestCycle().getResponse(), but that gives me a Response. I need a >> WebResponse. > > Just cast it > >> >> Do I need to set it in onResourceRequested()? Thanks >> >> -- >> View this message in context: >> http://apache-wicket.1842946.n4.nabble.com/How-to-set-HTTP-Header-Content-Length-in-IResourceListener-tp4489832p4489832.html >> Sent from the Users forum mailing list archive at Nabble.com. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> > > > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Become a Wicket expert, learn from the best: http://wicketinaction.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org