Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 11:02 Go to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
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 15:46 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
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] Wed, 29 April 2009 03:39 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
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 07:29 Go to previous message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
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 Nov 27 22:55:49 GMT 2021

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

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

Back to the top