Kev,
GREAT! Got it working. Your comment. "...it is removed *before* the actual script is processed by Rhino" made me think about the fact that I had a comment on the first line of the echo.get.js code:
Code:
// From Alfresco webscript (ala Spring). See also http://forum.springsource.org/showthread.php?t=95657 :
<import resource="classpath:/js/directwebUtil.js">
// Display various Object properties
function show_props(obj, objName) {
var result = "";
for (var i in obj) {
result += objName + "." + i + " = " + obj[i] + "<br />";
}
return result;
}
However, all my examples have the <import> statements FIRST. Once I removed the comment on the first line, it worked.
It would be nice if the pre-processor allowed comments, but I can certainly live without it. Very useful.
Thanks!,
Bob