Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to set object reference to servlet from RAP
How to set object reference to servlet from RAP [message #130202] Sun, 26 April 2009 07:02 Go to next message
Eclipse UserFriend
Hi all,

I've registered plain servlet using extension
org.eclipse.equinox.http.registry.servlets.

At runtime this servlet will receive request from external application
after which the RAP UI will be updated to inform user about the request.
In order to achieve this I think we need to have reference to RAP's
Display & Runnable object.

I intend to inject those references into the servlet at workbench's
preStartup event, but I still don't know how to do this.

Any help would be greatly appreciated.


Regards,

Setya
Re: How to set object reference to servlet from RAP [message #130711 is a reply to message #130202] Tue, 28 April 2009 11:46 Go to previous messageGo to next message
Eclipse UserFriend
Hi Setya,

Setya wrote:
> Hi all,
>
> I've registered plain servlet using extension
> org.eclipse.equinox.http.registry.servlets.
> At runtime this servlet will receive request from external application
> after which the RAP UI will be updated to inform user about the request.
> In order to achieve this I think we need to have reference to RAP's
> Display & Runnable object.
>
> I intend to inject those references into the servlet at workbench's
> preStartup event, but I still don't know how to do this.
If your "plain" servlet run ins the same context, you should be able
to pass the data via attributes of the http session.
Something like
RWT.getSessionStore().getHttpSession().setAttribute( ... );
After that you should be able to obtain the attribute from within
the servlet.

>
> Any help would be greatly appreciated.
>
>
> Regards,
>
> Setya
>

HTH
Rüdiger
Re: How to set object reference to servlet from RAP [message #130724 is a reply to message #130711] Tue, 28 April 2009 23:39 Go to previous messageGo to next message
Eclipse UserFriend
Rüdiger Herrmann wrote:
> Hi Setya,
>
> Setya wrote:
>> Hi all,
>>
>> I've registered plain servlet using extension
>> org.eclipse.equinox.http.registry.servlets.
>> At runtime this servlet will receive request from external application
>> after which the RAP UI will be updated to inform user about the
>> request. In order to achieve this I think we need to have reference to
>> RAP's Display & Runnable object.
>>
>> I intend to inject those references into the servlet at workbench's
>> preStartup event, but I still don't know how to do this.
> If your "plain" servlet run ins the same context, you should be able to
> pass the data via attributes of the http session.
> Something like
> RWT.getSessionStore().getHttpSession().setAttribute( ... );
> After that you should be able to obtain the attribute from within the
> servlet.
>
>>
>> Any help would be greatly appreciated.
>>
>>
>> Regards,
>>
>> Setya
>>
>
> HTH
> Rüdiger

Rudiger,

Thank you for your response.

Since the request comes from external application unfortunately it
doesn't share the same session with RAP, so I have to pass the reference
via ServletContext's attribute.

Regards,

Setya
Re: How to set object reference to servlet from RAP [message #130749 is a reply to message #130724] Wed, 29 April 2009 03:29 Go to previous message
Eclipse UserFriend
Hi Setya,

in that case you need some key (send with the request from your external
app) that allows a matching to a session. You could write a Servlet that
processes theses requests and provides this matching functionality.

I don't know your settings at deployment time but if your app runs
behind a LoadBalancer this gets even more complex.

Regards,
Stefan.

Setya schrieb:
>
> Since the request comes from external application unfortunately it
> doesn't share the same session with RAP, so I have to pass the reference
> via ServletContext's attribute.
>
> Regards,
>
> Setya
Previous Topic:Theme xml files
Next Topic:Error 500 when defining a favicon
Goto Forum:
  


Current Time: Sat Jul 12 21:02:11 EDT 2025

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

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

Back to the top