Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Request parameters in Freemarker on Spring 2.5

I am trying to get request parameters on freemarker page. But I can't figure out how to setup implicit variables like RequestParameters or so.

Here is a thread http://forum.springsource.org/showthread.php?t=32846 but I don't where he setup that RequestParameters object.

The only thing I found in docs (more in source code), that it is FreemarkerServlet which can place that variable. But I don't have it in my application. All configurations are done via Spring, i.e. View Resolver.

Can anybody help me?

like image 826
glaz666 Avatar asked Feb 15 '10 17:02

glaz666


1 Answers

For query string ?myparam=abc, you can get to myparam like that:

${RequestParameters.myparam}

Verified on Spring 3 + Freemarker 2.3.

Don't need any additional configuration for the view handler.

like image 72
Yuri Geinish Avatar answered Oct 10 '22 14:10

Yuri Geinish