How to remove ! symbol from the URL fragment while using Vaadin Navigator.

I am currently working on a Vaadin application, where I am using Navigator class. But the after navigation the URL looks something like this : http://localhost:8081/myapp/#!/accounts
I want to remove the ‘!’ symbol from the URL fragment as per our client requirement. Please somebody help me if it is possible.

Nanda Kishor

Hi, you just need to write a custom NavigationStateManager by extending UriFragmentManager and overriding the getState and setState methods like this:

public void setState(String state)  {
public String getState() {
    return getFragment() != null ? getFragment() : "";

Then just pass an instance of your custom manager to the Navigator constructor that accepts a NavigationStateManager.

You can also try to explain your customer
why there is the exclamation mark
in the URL, it may or may not be relevant in your case.