i wrote a simple post java backed webscript
String user = "admin";
user = req.getParameter("user");
model.put("user", user)
return model;
but every time I try it with : curl -X POST "http://localhost:8080/alfresco/s/test/hello.json?user=joey&guest=true"
I get this message error :
FreeMarker template error:
The following has evaluated to null or missing:
==> node [in template "test.post.json.ftl" at line 3, column 22]
Tip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)??
The failing instruction (FTL stack trace):
----------
==> ${node} [in template "test.post.json.ftl" at line 3, column 20]
----------
this is my test.post.json.ftl file :
{"test" :
{
"user" : "${user}"
}
}
Hello,
You have a deployment problem beacause the template that your webscript is parsing have this text ${node} in the line 3.
You can check in the Alfresco WebScripts Home (http://localhost:8080/alfresco/s/index/uri/) the info of your custom service (http://localhost:8080/alfresco/s/index/uri/test/hello).
Regards
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.