In the PLT.12.1.1 section of jsr 286 it says:

"Response properties can be viewed as header values set for the portal
application. If these header values are intended to be transmitted to the
client they should be set before the response is committed. When setting
headers in the render lifecycle phase portlets should set the header in the
render headers part or simply override the GenericPortlet.doHeaders method
(see PLT.11.1.1.4.3)."

I think you may try:

PortletRequestContext ctx = (PortletRequestContext) RequestContext.get();
PortletResponse presp = ctx.getPortletResponse();
presp.addProperty("header", "value");

this is kind of a hack but it might work..




Rob Sonke wrote:
> 
> No, too bad. The headers aren't picked up.
> 
> 
> Serkan Camurcuoglu wrote:
>> For the DynamicWebResource case, doesn't overriding setHeaders() in
>> DynamicWebResource and adding your http header in this method work?
>>
>> By the way, which portlet container are you working with?
>>
>>
>>
>>
>> Rob Sonke wrote:
>>   
>>> Hi,
>>>
>>> We're using wicket for our portlets now for almost 3/4 year and it's 
>>> great. We're following/try to help with the full implementation of jsr 
>>> 286 in wicket too (Thijs and me, see other threads). But I'm having a 
>>> problem now with offering files through a portlet. There are actually 
>>> two options, use the resource phase of jsr286 or use a separate download 
>>> servlet. First option rocks, second option not (if option 1 won't work, 
>>> I'll have to deal with it but I prefer not).
>>>
>>> So I'm trying to serve a file through the portlet based on a wicket 
>>> link. A normal link would end up in a actionResponse which will not 
>>> allow you to touch the resourcestream (returning null as the portlet 
>>> specs describe). An ajax link (which uses the resource phase) will end 
>>> up with a lot of binary code in the ajax xml output which will, of 
>>> course, not work.
>>>
>>> I tried also adding a DynamicWebResource to a wicket ResourceLink, which 
>>> works actually pretty good except that he's not communicating the 
>>> filename to the brower by setting a header. I tried adding a header to 
>>> the ResourceResponse but that one was not passed to the client too 
>>> (maybe I did that wrong).
>>>
>>> Could anyone point me in the right direction or could tell me what I'm 
>>> doing wrong over here?
>>>
>>> Regards,
>>> Rob
>>>
>>> ---------------------------------------------------------------------
>>> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Stream-download-files-through-portlet-tp19980617p19981860.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Reply via email to