I have some parts of my plugin which are loaded through AJAX on demand. Now there is a problem that although my velocity template for that command does not contain html head nor body tags, still JIRA inserts them automatically when I request my view from http://localhost:2990/jira/secure/MyAction!myCommand.jspa
How do I return only HTML structure from my own Velocity .vm view and stop JIRA from injecting its headers and body?
For the sake of completeness (if other users find this question): The answer is to wrap your template in a html body with the following header meta tag:
Additional information can be found under the same topic on Atlassian Answers.
The reason why a simple query parameter (?...&decorator=none...) has stopped working in Confluence 5 is documented in JIRA.