Hi Alberto,
The best way to avoid this is to automatically redirect the page to a "session ended" type page (or back to the home page) when the session ends.
If you wizard up a new app, you'll find some code in the footer which does this. The code looks like this;
if (p_web.GetSessionLoggedIn() and p_web.PageName <> p_web.site.LoginPage)
! parameter 1 is the session time
! parameter 2 is the name of the page where the user will go when the session ends.
! parameter 3 is the id of the <div> in the html.
p_web.Script('startCountDown('& int(p_web.site.SessionExpiryAfterHS/100) &',"'& clip(p_web.site.LoginPage) &'","countdown");')
end
the <div> in the 3rd parameter refers to a way to show the user the time left in the session. For example;
<div class="nt-right nt-countdown">Session Expires In:<<div id="countdown"><</div><</div>
cheers
Bruce