NeptuneZ
NeptuneZ

Reputation: 618

Thymeleaf Get Curent request parameter

I am developing a web app with Thymeleaf and Spring boot. I am using Fragments and a layout ; All I need is to print the request parameter in the header.

Exemple :

Is there any variable in Thymeleaf to get that ?

Thank you

Upvotes: 4

Views: 4781

Answers (1)

holmis83
holmis83

Reputation: 16604

The path up to the query string:

${#request.requestURI}

The query string:

${#request.queryString}

Get a specific parameter (from the query string):

${#request.getParameter('size')}

Upvotes: 10

Related Questions