Last updated Dec 8, 2017

How do I get hold of the GET-Parameters within a macro?

If you want to get hold of the GET-Parameters within your Macro (Java-Code), you need to access the Java servlet.

First add a dependency for the servlet-api to your pom.xml:

1 2 3 4 5 6 <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.4</version> <scope>provided</scope> </dependency>

Now you can easily access every parameter you wish like this:

1 String showParam = ServletActionContext.getRequest().getParameter("show");

Rate this page: