|
|
|
Re: org.eclipse.swt.Request clashes with other http-requests to custom IServiceHandlers? [message #507782 is a reply to message #507626] |
Thu, 14 January 2010 15:58 |
Rüdiger Herrmann Messages: 581 Registered: July 2009 |
Senior Member |
|
|
On 14.01.2010 07:21, Dmitry Pryadkin wrote:
> Hi Rüdiger,
>
> Flash application is hosted inside of the custom widget. It doesn't use
> rap request mechanism (i.e. org.eclipse.swt.Request). Instead it uses
> its own http requests through URLLoader.
that would mean that RAP mistakenly calls the hello-world
service-handler to serve a "normal" RAP request... somehow I doubt that.
I am sorry if I can't help much with this, but as long as this also only
happens ocassionally, it gets hard to investigate.
If you have any further information, please feel free to share it.
>
>
> Rüdiger Herrmann wrote:
>> On 13.01.2010 12:13, Dmitry Pryadkin wrote:
>>> Hello all,
>>>
>>> I've IServiceHandler.
>>>
>>> public void service() throws IOException, ServletException
>>> {
>>> HttpServletResponse response = ContextProvider.getResponse();
>>> response.addHeader("Cache-Control", "no-cache");
>>> response.addHeader("Content-Type", "text/html; charset=utf-8");
>>> response.setCharacterEncoding("UTF-8");
>>> HttpServletRequest request = ContextProvider.getRequest();
>>> ...
>>> response.getWriter().append("HELLO WORLD");
>>> ...
>>> }
>>>
>>> In some rare cases I've seen this error in the browser:
>>>
>>> ---
>>> Could not evaluate javascript response:
>>>
>>> 'HELLO WORLD' is undefined
>>>
>>> HELLO WORLD
>>> ---
>>>
>>> I don't know why it happens. This service handler has its own url and is
>>> accessed only by flash application.
>> How does the flash app issue requests? Does it use the RAP request
>> mechanism?
>>
>>>
>>> Seems that org.eclipse.swt.Request sometimes could clash with other
>>> http-requests made by flash application.
>>>
>>> I appreciate any ideas.
>>>
>>> Dmitry
>>
>>
--
Rüdiger Herrmann
http://eclipsesource.com
|
|
|
Re: org.eclipse.swt.Request clashes with other http-requests to custom IServiceHandlers? [message #507914 is a reply to message #507782] |
Fri, 15 January 2010 07:45 |
Dmitry Pryadkin Messages: 146 Registered: July 2009 |
Senior Member |
|
|
Rüdiger,
I've had thoughts about ContextProvider.getResponse(), perhaps it could
have returned a response from another request.
However, the case was a rare one. Occured just once.
Thanks
Rüdiger Herrmann wrote:
> that would mean that RAP mistakenly calls the hello-world
> service-handler to serve a "normal" RAP request... somehow I doubt that.
> I am sorry if I can't help much with this, but as long as this also only
> happens ocassionally, it gets hard to investigate.
> If you have any further information, please feel free to share it.
>
> On 14.01.2010 07:21, Dmitry Pryadkin wrote:
>> Hi Rüdiger,
>>
>> Flash application is hosted inside of the custom widget. It doesn't use
>> rap request mechanism (i.e. org.eclipse.swt.Request). Instead it uses
>> its own http requests through URLLoader.
>
>>
>>
>> Rüdiger Herrmann wrote:
>>> On 13.01.2010 12:13, Dmitry Pryadkin wrote:
>>>> Hello all,
>>>>
>>>> I've IServiceHandler.
>>>>
>>>> public void service() throws IOException, ServletException
>>>> {
>>>> HttpServletResponse response = ContextProvider.getResponse();
>>>> response.addHeader("Cache-Control", "no-cache");
>>>> response.addHeader("Content-Type", "text/html; charset=utf-8");
>>>> response.setCharacterEncoding("UTF-8");
>>>> HttpServletRequest request = ContextProvider.getRequest();
>>>> ...
>>>> response.getWriter().append("HELLO WORLD");
>>>> ...
>>>> }
>>>>
>>>> In some rare cases I've seen this error in the browser:
>>>>
>>>> ---
>>>> Could not evaluate javascript response:
>>>>
>>>> 'HELLO WORLD' is undefined
>>>>
>>>> HELLO WORLD
>>>> ---
>>>>
>>>> I don't know why it happens. This service handler has its own url
>>>> and is
>>>> accessed only by flash application.
>>> How does the flash app issue requests? Does it use the RAP request
>>> mechanism?
>>>
>>>>
>>>> Seems that org.eclipse.swt.Request sometimes could clash with other
>>>> http-requests made by flash application.
>>>>
>>>> I appreciate any ideas.
>>>>
>>>> Dmitry
>>>
>>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03533 seconds