Extra markup in servlet response | Community
Skip to main content
New Participant
October 16, 2015
Solved

Extra markup in servlet response

  • October 16, 2015
  • 2 replies
  • 1120 views

I have a page component, which includes a JSP called getString.jsp that's intended to be called via Ajax, like domain.com/path/path/page.getString.html. This was working fine in CQ 5.4 - when I call that URL, I get a simple string value. When I upgraded to AEM 6.1, I started getting the correct string, but with an HTML comment similar to this after it

<!--cq{"decorated":false,"type":"client/project/components/page/inuitGridContentPage","path":"/content/path/en_US/pages/home/jcr:content","selectors":"selectorName","servlet":"servletClass","totalTime":1,"selfTime":1}-->

I tried migrating that functionality to a servlet in my OSGi bundle instead of a small JSP, but the result is the same (that HTML comment above actually comes from this test).

The strange thing is that I have a different servlet doing a similar thing which does not append a similar comment. Does anyone know where this is coming from?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

HI

IIRC this is injected by some filter (WCMDebugFilter?). It's quite likely that it deoendes on the extension of your request (in your case ".html"). If you change to something else (for example ".json") it will go away.

kind regards,
Jörg

2 replies

joerghoh
joerghohAccepted solution
Employee
October 16, 2015

HI

IIRC this is injected by some filter (WCMDebugFilter?). It's quite likely that it deoendes on the extension of your request (in your case ".html"). If you change to something else (for example ".json") it will go away.

kind regards,
Jörg

New Participant
October 16, 2015

Thanks. I ended up using .xml - .json gave me an error in the DefaultGetServlet, I think it was.