JSP出现Duplicate local variable path报错
Multiple annotations found at this line:
- Duplicate local variable path
- Duplicate local variable
basePath
其实就是说明你要加载的文件中含有重复变量,这是因为在myeclipse中创建另一个需要链接的Jsp文件
编译器会自动生成下面梁行代码。
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
处理方法:
将错误提示里的jsp文件里的这两行代码删除掉即可。