i am displaying an image resource on my application scresns using VaadinService.getCurrent().getBaseDirectory() method. The issue is once I close a session using VaadinSession.getCurrent().close(), the VaadinService.getCurrent is returning null and hence once I close the session, the images are not getting displayed until I referesh the browser. How do I avoid this.
Of course; when you close the session, you are telling the servlet container that you don’t need anything from that session anymore. What exactly are you showing, and why? Why are you calling session.close()?
Login is present as a lonk on the Main screen and once logged in the user details are stored in session
There are bunch of functional screens with a log out option on each of these screens
Once logged out, the session has to be invalidated and it has to return to Main screen on step 1
On all the screens there is a Logo on Top which is loaded as a Image Component using file resource with base directory obtained fro mVaadinService.getCurrent().getBaseDirectory(). Now when I invalidate the session and redirect to home page, VaadinService is null and the image is not being displayed.