03-19-2010 03:40 PM
'Expression results is undefined on line 2, column 18 in testIssue\/test-issue.post.json.ftl.'
<webscript>
<shortname>Test Webscript</shortname>
<description>Test webscript for result</description>
<url>/hmm/testIssue</url>
<format default="json"/>
<authentication>user</authentication>
</webscript>
function main(){
model.results = "hello";
}
main();
{
"results":"${results}"
}
03-19-2010 04:11 PM
03-19-2010 06:29 PM
18:25:02.439[22ms][total 22ms] Status: 200[OK]
GET http://localhost:8080/alfresco/service/hmm/testIssue?alf_method=post Load Flags[VALIDATE_ALWAYS LOAD_DOCUMENT_URI LOAD_INITIAL_DOCUMENT_URI ] Content Size[41] Mime Type[application/json]
Request Headers:
Host[localhost:8080]
User-Agent[Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6]
Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
Accept-Language[en-us,en;q=0.5]
Accept-Encoding[gzip,deflate]
Accept-Charset[ISO-8859-1,utf-8;q=0.7,*;q=0.7]
Keep-Alive[115]
Connection[keep-alive]
Authorization[Basic YWRtaW46YWRtaW4=]
Cache-Control[max-age=0]
Response Headers:
Server[Apache-Coyote/1.1]
Cache-Control[no-cache]
Pragma[no-cache]
Content-Type[application/json;charset=UTF-8]
Content-Length[41]
Date[Fri, 19 Mar 2010 22:25:02 GMT]
03-29-2010 12:35 PM
09-22-2016 11:11 PM
Quite old, but since I came across this post through a google search it might still be relevant to somebody:
You need to paste this into your json.ftl file:
<#escape x as jsonUtils.encodeJSONString(x)>
{ "results": "${results}" }
</#escape>
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.