Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- TemplateEngine templateEngine = (TemplateEngine) getServletContext()
- .getAttribute(ThymeleafConfig.TEMPLATE_ENGINE_ATTR);
- IWebExchange webExchange = JakartaServletWebApplication.buildApplication(getServletContext())
- .buildExchange(request, response);
- WebContext context = new WebContext(webExchange);
- context.setVariable("name", "Anderson Almada");
- templateEngine.process("index", context, response.getWriter());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement