HiInstead of passing the entire HTML as a parameter to servlet you can
try to get the HTML of the webpage from backend itself using the path of
the page.You can use the following block of code to retrieve the HTML
from page path:public String getHTML(String filePath,
SlingHttpServletRequest request, RequestResponseFactory
requestResponseFactory, SlingRequestProcessor requestProcessor) throws
ServletException, IOException { HttpServletRequest req =
requestResponseFactory.createRequest("GET", file...