Tag Archives: HttpServletResponse

Problem overview: the setcharacterencoding() method of httpservletresponse reports an error

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]