Problem Description: after the old project is migrated to the new workspace, the setCharacterEncoding () method calling HttpServletResponse is wrong: there is no such method. p>
Solution: delete [web app libraries] and [JavaEE library] in Java build path, then add [JavaEE library] and dependent jar packages in turn, and add to build path again. Problem solving
Analysis: the referenced jar package is [javax. Servlet. Jar]. Not the [JavaEE. Jar] we want to use
The reason for analysis may be that in the previous [web app libraries], there was a jar package used for [javax. Servlet. Jar], and when migrating the project, first migrate [web app libraries]. Therefore, the httpservletresponse in the program is automatically associated with [javax. Servlet. Jar]
Similar Posts:
- TypeError: isinstance() arg 2 must be a type or tuple of types
- Failed to resolve: package name resolution
- ModuleNotFoundError: No module named ‘utils’ [How to Solve]
- The difference between web app libraries and referenced libraries in eclipse project
- [jQuery version] cannot read property ‘MSIE’ of undefined solution
- Solutions to typeerror: expected string or bytes like object error
- HTTP Status 500 – Unable to compile class for JSP settlement program
- [Solved] Springboot Project mybatis Error: Invalid bound statement (not found)
- The following table: unable to import javax. Servlet. HttpServletRequest
- Ionic reported an error when creating a new project — it has been solved