java – WebContext constructor not recognized by Eclipse
I’m having problem with the declaration of WebContext object.
I’m using the following constructor:
final WebContext webContext = new WebContext(request, response, servletContext, request.getLocale());
But it says it’s an error: The constructor WebContext(HttpServletRequest, HttpServletResponse, ServletContext, Locale) is undefined
It seems strange to me because here www.thymeleaf.org/apidocs/thymeleaf/3.0.0.BETA01/org/thymeleaf/context/WebContext.html
it’s listed as one of possible constructor.
Also I have downloaded the Thymeleaf JARs and have already added them all to the library and I have imported the following:
import org.thymeleaf.context.WebContext;
but nothing seems to change.
If I add a 5th parameter Map it accepts it but I don’t want to add that.
Read more here: Source link