How to disable the System messages in vaadin 7?

Hi all,

I need to know, Whether how to disable the system messages in vaadin 7?

I used this,

    protected void init(VaadinRequest request) {
       .....
       .....
       .....
}

public static SystemMessages getSystemMessages() {

	CustomizedSystemMessages messsages = new CustomizedSystemMessages();

	messsages.setSessionExpiredNotificationEnabled(false);

	messsages.setSessionExpiredURL(VaadinService.getCurrentRequest().getContextPath());

	messsages.setCommunicationErrorURL(VaadinService.getCurrentRequest().getContextPath());

	messsages.setAuthenticationErrorURL(VaadinService.getCurrentRequest().getContextPath());

	messsages.setInternalErrorURL(VaadinService.getCurrentRequest().getContextPath());

	messsages.setSessionExpiredURL(VaadinService.getCurrentRequest().getContextPath());

	messsages.setCommunicationErrorURL(VaadinService.getCurrentRequest().getContextPath());

	return messsages;
}

But its still showing the same messages as red colored popup.

can any one help me over this…

Thanks in advance for your kind reply.

Regards,
Aravind

In Vaadin 7 you have to specify your own custom Servlet to do this.

Like this:[code]
public class MyCustomServlet extends VaadinServlet {
private static final long serialVersionUID = 1L;

@Override
protected void servletInitialized()
        throws ServletException {
	getService().setSystemMessagesProvider(
		    new SystemMessagesProvider() {
				private static final long serialVersionUID = 1L;

			@Override 
		    public SystemMessages getSystemMessages(
		        SystemMessagesInfo systemMessagesInfo) {
		        CustomizedSystemMessages messages =
		                new CustomizedSystemMessages();
		        messages.setCommunicationErrorCaption("Test");
		        return messages;
		    }
		});
    super.servletInitialized();
}

}

[/code] and in your web.xml: <servlet-name>Vaadin Application Servlet</servlet-name> <servlet-class>com.example.test.MyCustomServlet</servlet-class>

Thanks for your reply.

It works fine.