Hi, forum followers.
I’m newbie in Portal component and I try to implement externelised text in the web site with ThymeLeaf, using th:text with location of externalized text based on .properties files.
In PortalController class there is the creation of a Thymeleaf context, as you can see on next code fragment:
@RequestMapping(value = "/", method = RequestMethod.GET)
public String index(Model model, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext, TemplateEngine templateEngine){
WebContext ctx = new WebContext(request, response, servletContext, request.getLocale());
try {
templateEngine.process("index", ctx, response.getWriter());
} catch(IOException e){
log.error("Error ",e);
}
return "index";
}
In execution next error appears: HTTP-500 No primary or default constructor found for interface javax.servlet.ServletContext
What context should I use to achieve for using th:text in the template for externalized text based on properties files?.
Thanks in advance.