throws Exception {
String sMimeType = "application/json";
String sResponse = "";
String sCallback = "";
MessageBroker msgBroker = null;
try {
// determine the response format
String f = Val.chkStr(request.getParameter("f"));
if (f.equalsIgnoreCase("pjson")) {
sMimeType = "text/plain";
}
sCallback = Val.chkStr(request.getParameter("callback"));
msgBroker = this.getMessageBroker(request,response,context,msgBroker);
// determine the property keys
String sKeys = Val.chkStr(request.getParameter("keys"));
String[] aKeys = sKeys.split(",");
// lookup the strings
StringBuilder sb = new StringBuilder();
sb.append("{\"i18n\": {");
int n = 0;
if ((aKeys != null) && (aKeys.length > 0)) {
for (String sKey: aKeys) {
String sValue = msgBroker.retrieveMessage(sKey);
n++;
if (n > 1) sb.append(",");
sb.append("\r\n\t");
sb.append("\"").append(Val.escapeStrForJson(sKey)).append("\": ");
sb.append("\"").append(Val.escapeStrForJson(sValue)).append("\"");