Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access a local IBM Notes application with default system browser

I am developping web applications using the Xpages framework from the IBM Lotus Notes technology.

My users don't use the embedded Notes Client browser, but use a regular modern browser (Firefox, Chrome) to browse Notes applications.

Everything is ok when the user has an internet connexion, he can access the application on the online server through his favorite browser.

However some of my applications need to be used Offline, in local. When a user works in local, he opens the IBM Notes Client, go to his workspace and click to open an application locally. Then, the Notes Client runs a http server on a random port and open the application with the embedded Notes Client browser.

What I want to achieve is to be able to open the application on a regular browser (Firefox, Chrome), by just using the default system browser and not the embedded Notes Client browser.

Here is what I tried without success :

With window.location.href I get the port where the local http server runs and the path to the page that is opened in the embedded Notes Client browser. I get this kind of result :

127.0.0.1:54428/xsp/Gfn/CoffeShop.nsf/xp_home.xsp?OpenXPage&&xspRunningContext=Notes

So I just keep the interesting part :

127.0.0.1:54428/xsp/Gfn/CoffeShop.nsf/xp_home.xsp

Now I need to pass the session id has a parameter of this http request so the browser will have the right to access the application. I get the session ID with the following :

facesContext.getExternalContext().getRequest().getSession().getId()

From this I get an ID and I build my complete http request :

127.0.0.1:54428/xsp/Gfn/CoffeShop.nsf/xp_home.xsp?SessionID=ID-fae7aca8f062023972fe35e5909b0106f44ba2ae

But when I try this into a regular browser, instead of getting the page I get an error 500. If I look at the log of the server, I see the following error message :

Exception Thrown javax.servlet.ServletException: The request is not coming from a trusted Rich Client part

But I am sure my ID is correct. I tried to investigate this on the internet but no success for now, I would be happy if someone has an idea about what do I miss? Or maybe another way to open a local application in the default system browser?

Thank you!

like image 927
jeremy_krein Avatar asked Nov 29 '25 13:11

jeremy_krein


1 Answers

In short, you can't. This is disabled by security restrictions.

But maybe you should think again about a XPiNC application: With 9.0.1, the underlying XULRunner component was upgraded and supports now HTML5 and a lot of the "newer" features.

It matches Firefox 10.0.6, here are the HTML5 test results: https://html5test.com/s/555ae51ca555ac7b.html

like image 93
Sven Hasselbach Avatar answered Dec 02 '25 05:12

Sven Hasselbach



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!