The method getContextPath() from the type HttpServletRequest refers to the missing type
2016-11-07 22:42
651 查看
这种问题主要是以下两种情况:
1.jar包问题。解决方法:project右键Properties---java build path下remove掉有问题的jar包,一般都是jre的jar包有问题,然后add library导入正确的jar包(如果原来没有设置jer,则可以在Window-Preferences-Java-Installed JRES增加对应的jre包)。
2.编码格式没有对应,如果页面设置的pageEncoding为“UTF-8”,则设置项目编码格式都为UTF-8(project右键Properties--Resource下Other选择UTF-8)。
1.jar包问题。解决方法:project右键Properties---java build path下remove掉有问题的jar包,一般都是jre的jar包有问题,然后add library导入正确的jar包(如果原来没有设置jer,则可以在Window-Preferences-Java-Installed JRES增加对应的jre包)。
2.编码格式没有对应,如果页面设置的pageEncoding为“UTF-8”,则设置项目编码格式都为UTF-8(project右键Properties--Resource下Other选择UTF-8)。
相关文章推荐
- The method getContextPath() from the type HttpServletRequest refers to the missing type
- The method getContextPath() from the type HttpServletRequest refers to the missing type
- The method getContextPath() from the type HttpServletRequest refers to the missing type
- The method getContextPath() from the type HttpServletRequest refers to the missing type
- The method getContextPath() from the type HttpServletRequest refers to the missing type
- The method getContextPath() from the type HttpServletRequest refers to the missing type
- the method getcontextpath() from the type httpservletrequest refers to the missing type string
- The method getContextPath() from the type HttpServletRequest refers to the missing type
- The method getContextPath() from the type HttpServletRequest refers to the missing type
- String cannot be resolved to a type - The method getContextPath() from the type HttpServletRequest r
- The method getContextPath() from the type HttpServletRequest
- - String cannot be resolved to a type - The method getServerName() from the type ServletRequest
- The method getServletContext() is undefined for the type HttpServletRequest
- SSH出错---The method getRealPath(String) from the type ServletRequest is deprecated request.getRealPath("")
- The method getServletContext() is undefined for the type HttpServletRequest
- jsp The method getDispatcherType() is undefined for the type HttpServletRequest
- The method getDispatcherType() is undefined for the type HttpServletRequest
- JSP页面中的request.getContextPath()出现“ .... .. refers to the missing type String”错误
- Spring找不到方法:The method getDispatcherType() is undefined for the type HttpServletRequest
- 日常问题记录--访问JSP文件时The method getDispatcherType() is undefined for the type HttpServletRequest