Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » org.eclipse.swt.Request clashes with other http-requests to custom IServiceHandlers?
org.eclipse.swt.Request clashes with other http-requests to custom IServiceHandlers? [message #507397] Wed, 13 January 2010 11:13 Go to next message
Dmitry Pryadkin is currently offline Dmitry PryadkinFriend
Messages: 146
Registered: July 2009
Senior Member
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.

Seems that org.eclipse.swt.Request sometimes could clash with other
http-requests made by flash application.

I appreciate any ideas.

Dmitry
Re: org.eclipse.swt.Request clashes with other http-requests to custom IServiceHandlers? [message #507579 is a reply to message #507397] Wed, 13 January 2010 21:34 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
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 #507626 is a reply to message #507579] Thu, 14 January 2010 02:18 Go to previous messageGo to next message
Dmitry Pryadkin is currently offline Dmitry PryadkinFriend
Messages: 146
Registered: July 2009
Senior Member
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
>
>
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 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
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 Go to previous message
Dmitry Pryadkin is currently offline Dmitry PryadkinFriend
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
>>>
>>>
>
>
Previous Topic:internationalization and single sourcing
Next Topic:Registering applet as resource
Goto Forum:
  


Current Time: Wed Dec 01 20:54:38 GMT 2021

Powered by FUDForum. Page generated in 1.48050 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top