AnsweredAssumed Answered

Getting Request value inside Template file

Question asked by vesuinfo on Jul 22, 2009
Latest reply on Sep 30, 2009 by vdamodaran
Hi All,

I am trying to get "Request value" inside the FreeMarker Template file, but if i try to use  ${RequestParameters['test']}
or ${RequestParameters.test},

Ref Link to get Request value in FreeMarker Template file:
http://forum.springsource.org/archive/index.php/t-32846.html

if i try to use  ${RequestParameters['test']} or ${RequestParameters.test}, I am getting the following error:

        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:595)
Caused by: freemarker.core.InvalidReferenceException: Expression request is undefined on line 11, column 3 in workspace://SpacesStore/ec431954-2b52-4797-96f6-8469f49ebd78.
        at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
        at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134)
        at freemarker.core.Dot._getAsTemplateModel(Dot.java:78)
        at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
        at freemarker.core.Expression.getStringValue(Expression.java:93)
        at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.Environment.process(Environment.java:188)
        at freemarker.template.Template.process(Template.java:237)
        at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:202)
        … 88 more

please help me to get the request attributes value in template files ?

Thank you.

Thanks,
Saran

Outcomes