Session time out

I am using SpringApplication with spring security. After the session times out, spring security forwards requests to the login page.
In some cases this causes a red “Communication error” window with the following error message:

(SyntaxError): unterminated regular expression literal stack: vkb("head>\n\t\n\t\n\n\n\t

You have tried to access a protected area of this application.
\n\t

By default you can login a ....

Of course, I would prefer to have a nice error message saying that the connection has timed out instead of this cryptic internal error with partial contents of the login page.

Is there anything I can do about this? I tried Application.getSystemMessages(), but found no clue

Kind regards,
Roland

Did you find a solution to that, having the same kind of problem I am curious about it ?

Nicolas

Old thread, but as someone asked again: did you try
CustomizedSystemMessages
.setCommunicationErrorURL(…) and .setCommunicationErrorNotificationEnabled(false)?

The clean solution would be to replace one or two of the Spring security servlet filters with ones customized for Vaadin, and maybe update the client side class ApplicationConnection to play better together with them. That is actually exactly how Spring security in intended to be used - the servlet filter stack is modular for a reason. I have written about this several times in the past, but never had the time to implement it. See e.g.
this post
and the post linked from it.

Hi,
you might find the
thread on session timeout
useful

Tom

Hello, please I want to integrate spring security with my vaadin maven project so I am now able to see the login default form but I want to extract users from a postgres database.I dont find any tuto.Can you help me please? thank you