How to set object reference to servlet from RAP [message #130202] |
Sun, 26 April 2009 11:02 |
|
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 #130724 is a reply to message #130711] |
Wed, 29 April 2009 03:39 |
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03334 seconds