As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
I find it hard to reconcile MikeH's answer with Alfresco's trumpeting of WebScripts and HTTP APIs as the new, cool way to develop applications. If we have the problem of rewriting all URLs whenever we need to present a script's output in a portal, what are HTTP APIs that return HTML good for?