Cause and work around for variable burst


In my application, build in Vaadin 6.7.8), I implemented ‘HttpServletRequestListener’ for session variables.

It is working fine, but added code to download an excel sheet and then when the button to download the excel is clicked
the session is closed.

After debugging, I understood it gives error as ‘variable burst’. Can anyone tell me what is the exact cause for this ‘variable burst’.

I am using -
main.addListener(new Window.CloseListener() {
public void windowClose(CloseEvent e) {
System.out.println(“Closing the application”);
as to close the application if browser window is closed (or tab). If this is commented or removed than everything work fine.

If I comment this code, than what is other way to close the application or invalidate session (so the session data is not shared).

Please tell the remedy.


Why the variable burst occurs and how to over come it.
Please help me.

The browser does not tell the server (in general - not just for Vaadin) in the close event where you go when navigating away from a page. Navigating away can mean typing a URL to the location bar or clicking a link that leads to your Excel file or even just reloading the page.

A further complication is that not all browsers send close events so that the client side part of the application can tell the server that the browser is leaving the page. I think this is the case for Opera, at least in some cases.

There is a reason most web applications have a separate “sign out” link. Automatically handling this (beyond what session time-outs can do) isn’t reliable and usable enough and deprives users of some of the control. Correctly implementing polling for keep-alive purposes is also tricky. A combination of a short session time-out and an explicit logout link is probably your best option if you need to make sure the application is not left on for extended periods.

Consider also suggesting the browser to open the Excel file in a separate window or tab (last parameter to if I remember correctly).

Hi Henri,

In my application, I am uploading excel sheet and then validating the data and
then if error(s) are- noticed in data, the record(s) having errors are made available to user
to download.

So unless the user select the option to down error records, every thing works fine.
Only when user clicks to down data, variable occurs and application closes.

And I also to disable the browser back button.
Please help me to achieve these.

Vivek -