I have written request filter and locale resolver for getting language code from URL. (for example: DOMAIN/en/, DOMAIN/cs/) 

However, I don't know how to change programmatically the context path that Thymeleaf uses for its context-relative URLs (@{/css/main.css}).

For example, if on page with address "DOMAIN/en/test/" is following code

```
<a th:href="@{/test2/}">TEST 2</a>

```

it points at 

```
DOMAIN/test2/ 

```

instead of

```
DOMAIN/en/test2/

```

I thought it would be good to create some filter that edits the URL before it goes to Thymeleaf templates, but I don't have any idea how. 

Do you have any ideas how to solve it?