Am using Vaadin 6.8. Though the below link describes how Vaadin supports multiple browser tab,
https://vaadin.com/web/joonas/wiki/-/wiki/Main/Supporting%20Multible%20Tabs
Tabs of same browser will be using same http session and hence same application instance. However, tabs use different window objects there by giving an illusion of multi tab support.
But, Vaadin locks the application instance while processing the httprequests (specially updateUIDL calls). All http requests for a given session are processes serially.
Until tab1 request is processed completely, tab2 request will not be processed.
So, a busy loading icon is shown on both tabs.
AbstractCommunicationManager.doHandleUidlRequest() locks the application object.
Anyone has a workaround for this issue? or
Is there anyway to force vaadin to use new http session for each tab or pop up?
Related
I have created my first Electron app which is a dashboard that collects a list of URLs from a mongodb and scrolls through each URL using a predefined time delay between URLs. I am using this to display information screens from different BMS systems (Building Management / Building Automation systems) which all reside on the same local network. The BMS systems require user logins in order to view the screens. I have created some code in my preload script which injects the necessary login credentials into the proper DOM elements and activates the submit method. (I know this is not 100% secure but to help that situation, I am running the dashboard in kiosk mode with DevTools disabled. Further more, the systems I am connecting to do not contain any super sensitive data only temperature readings, etc.) I create the main browser window once and call the loadURL method in a different function which loads the next URL in the list. The problem I am having is that after rotating between all of the displays in system-A, when I load the URLs from system-B, the app has to login to that system (Totally expected behavior), however, when my logic finishes displaying the URLs from system-B and loops back to system-A, my app has to login to system A again even though I had already logged into system A prior to displaying system-B screens and I never destroyed the original browser window. Is there a way to maintain persistent session info to prevent this reoccurring login process when switching from system to system? Ideally I would like to maintain the persistent session info until I quit the app.
I have read over the documentation for the session and cookies methods, but being new to JavaScript and Electron, I couldn't quite wrap my head around how to implement the classes. Any help with this would be greatly appreciated.
I want to stress test JSF application (using Primefaces) with Jmeter and I'm facing a strange problem.
Said application saves some textual field and one image field. The workflow of application is that, on image upload control (primefaces) image is stored in session and on save button click application saves textual data as well as image data (from session).
Now the problem is this: I made two post request - one with image data and 2nd with textual data - but the page can't simulate saving.
Is there any way to simulate the process in jmeter?
Given you send the same requests as browser does you should be able to replicate the browser behaviour, just make sure to:
Properly build HTTP Request sampler(s)
Pay attention to HTTP Headers
Correlate dynamic parameters like JSF ViewState
With regards to point 1 it should be sufficient to just record the requests using JMeter's HTTP(S) Test Script Recorder, just make sure to copy the file(s) you're uploading to the "bin" folder of your JMeter installation, this way JMeter will be able to properly capture the requests. See Recording File Uploads with JMeter article for more details.
Points 2 and 3 - cross check the requests which are being sent from browser using browser developer tools and JMeter's View Results Tree listener - the requests need to be exactly the same apart from dynamic parameters which need to be correlated
And don't forget to add HTTP Cookie Manager to your Test Plan, it should deal with JSESSIONID and other cookies
Given that we can do routing with Express on the server, why do need a client side router?
What are the benefits, and is it only significant to SPA?
Client side routing is required to keep your application in sync with the browser URL.
It is mainly useful for Single Page Applications where the backend will be used for RESTful API calls via XHR or AJAX calls.
Being a SPA uses can book mark your URL and when they hit the URL again , your application should load that page with the data and its state.
The main difference between Server side routing and client side routing:
1. In Server Side routing you download(serve) the entire page.
2. In client Side routing along with the entire page, you can serve a specific portion of a page, reuse the DOM, manually manage the URL and history states. eg.
www.something.com/page1/tab1 will show tab1 in the UI
www.something.com/page1.tab2 will show tab2 in the UI
In this way the url can get more complex and you can have sub-routes with states.
Those who need a client-side router, need it for state management. Say you have server-rendered pages, but with some client-side widgets - e.g. a calendar, set of filters or collapsed or open sidebar. Router helps you initialize these components of the page in the exact state you want them. Granted, you could do most of it and all of the use cases I've named on the server, too. But it's usually a lot easier to handle these on the client. You might render it faster on the server, but sometimes, especially when doing partial page updates, it's cheaper and faster to handle that client-side.
I have a single page app written in node.js which has a fair amount of javascript and css.
now is it possible to load the offline version of webpage as soon as the url is entered and at the same time send the request to server and wait for response while the offline version is showing a nice splash screen?
in other words, instead of waiting for the response from server and then render the application, I prefer that browser would render the app while the request is being sent.
this way the page is loaded instantly(with the splash page) and the time that requests are being sent and responses are being returned, the javascript and css is being loaded which saves some time.
is this possible with modern technologies? and is it even a good idea?
I'm using WebKitGTK+ ( WebKit ) application that will be a very simple web browser running in a Linux environment as a separate executable that will need to exchange data between another application. The system is described in the following image:
Example scenario:
Event such as smart card insertion detected in Backend processing Application
smart card data is read and passed to the WebKitGTK+ GUI Application
User interacts with "web page" displayed in WebKitGTK+ Application
Data is passed from WebKitGTK+ Application back to the Backend processing Application
What are the common methods of passing data between the WebKitGTK+ Application and the Backend processing Application?
Does `WebKitGTK+ provide some hooks to do this sort of thing? Any help at all would be appreciated.
I know this is a old question, but will try to answer it to best of my abilities so that it can be useful to someone else.
Webkit is basically rendering a html page. You can connect to various signals that webkit provides and act on these signals. More details at http://webkitgtk.org/reference/webkitgtk/stable/webkitgtk-webkitwebview.html
For your back end application, if something interesting happens, you can update page either by navigating to a new url, new page contents or just by setting text of desired element. Webkit provides DOM api functions and all of these are possible.
It becomes interesting when getting data from webkit and sending it to your back end system. Again, this depends upon your specific design, but generally you can hook up signals such as navigation signals when user clicks on a button and get contents. Another alternative is to use alert handler and simply use javascript alert and process the alert data on backend side.
Shameless plug for example : https://github.com/nhrdl/notesMD. It uses a simple database backend, probably can be good use case as it sends data back and forth between database and webpage. Even manipulates the links so that desired actions take place.