I would like to place a Java array in a scope variable. Here is how the array is build
Person[] persons = null;
ClientConfig config = new DefaultClientConfig();
Client client = Client.create(config);
WebResource service = client.resource(url);
String json = service.accept(MediaType.APPLICATION_JSON).get(String.class);
ObjectMapper mapper = new ObjectMapper();
persons = mapper.readValue(json, Person[].class);
return persons
I use the Jackson library to parse JSON into Java objects ref: http://jackson.codehaus.org/1.0.1/javadoc/org/codehaus/jackson/map/ObjectMapper.html
I can bind the persons array directly to a repeat control.
However if I attempt to store the array first in a scope variable I get a 500 error message.
var persons = personsBeanTest.getPersons("http://dev1/fakenames.nsf/api/data/collections/name/people?count=10");
viewScope.put("names",persons);
HTTP JVM: CLFAD0211E: Exception thrown. For more detailed information, please consult error-log-0.xml located in C:/Program Files/IBM/Domino/data/domino/workspace/logs HTTP JVM: CLFAD0229E: Security exception occurred servicing request for: /fakenames.nsf/index_1.xsp - HTTP Code: 500. For more detailed information, please consult error-log-0.xml located in C:/Program Files/IBM/Domino/data/domino/workspace/logs
Can someone explain what I am doing wrong and how I should correct the code to place the array into a scope variable?
Security exception occurred
so I'd look in that direction. – Thomas