use of com.willshex.blogwt.server.page.PageMarkup in project blogwt by billy1380.
the class MainServlet method processStaticRequest.
/**
* @param fragmentParameter
* @param request
* @throws IOException
* @throws FailingHttpStatusCodeException
*/
private void processStaticRequest() throws IOException {
HttpServletRequest request = REQUEST.get();
String fragmentParameter = request.getParameter("_escaped_fragment_");
Stack s = Stack.parse(fragmentParameter);
PageMarkup p = PageMarkupFactory.createFromStack(s);
HttpServletResponse response = RESPONSE.get();
response.setCharacterEncoding(ServletHelper.UTF8);
response.setHeader("Content-Type", "text/html; charset=" + ServletHelper.UTF8);
if (p != null) {
response.getOutputStream().write(p.asString().getBytes());
}
}
Aggregations