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:

<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:

String showParam = ServletActionContext.getRequest().getParameter("show");
Was this page helpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport