Hi,
I tried to localize the SystemMessages, but for example when session timeout happen the localized message displayed corretly but the next PUSH request displays another message with wrongly encoded characters.
I have created a
screen capture
for this.
I attach the sample projet, it can be started with mvn jetty:run
Do you have any suggestion what should I do to correct the character encoding or disable the second message?
When I use push with websocket transport this issue is not appears (the second message is displayed this time with correct encoding), but I can not use websocket transport because of other
issue
.
I use this simple code to localize SystemMessages:
@WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true)
@VaadinServletConfiguration(ui = MyUI.class, productionMode = false, heartbeatInterval=3, closeIdleSessions=true)
public static class MyUIServlet extends VaadinServlet {
@Override
protected void servletInitialized() throws ServletException
{
super.servletInitialized();
getService().setSystemMessagesProvider(new SystemMessagesProvider() {
@Override
public SystemMessages getSystemMessages(
SystemMessagesInfo systemMessagesInfo) {
CustomizedSystemMessages csm = new CustomizedSystemMessages();
csm.setSessionExpiredCaption("Session expired - öüóőúéáűíÖÜÓŐÚÉÁŰÍ");
csm.setSessionExpiredMessage(csm.getSessionExpiredMessage() + "öüóőúéáűíÖÜÓŐÚÉÁŰÍ");
return csm;
}
});
}
}
17950.gz (2.94 KB)