Entire html is wrapped by div tag on "viewsourcepage"

santhoshk392709 12-12-2018


I have 404 page in AEM 6.2 and if I change 404 to some random errors.html it is redirecting to 404 page. I have observed that the html is wrapped by <div> tag on viewsourcepage. Any solution to get rid off div tag ?? I have tried with cq:noDecoration: {boolean} true also unfortunately have noticed side effects on component level. So looking for any other solution.

Below is the sample viewsourcepage code:



Accepted Solutions (1)

Accepted Solutions (1)

Ravi_Pampana 12-12-2018

The div tag is above doctype, so seems it is not related to aem components. You need to check the template/jsp files which are rendering for 404 page and there might be empty div added which needs to be removed to get rid of that.

Answers (2)

Answers (2)

Ravi_Pampana 13-12-2018

Hi Santhosh,

404 page mostly do not use any template. You may need to check whether the redirect is happening from apache or there will be 404 file under /apps/sling/servlet/errorhandler/404.jsp (in my case). You can check the 404 jsp files.

santhoshk392709 13-12-2018

Hi Ravi,

I have verified @ template/jsp level also, no root cause have been identified. template is looks good.

any other potential area would you recommend ??