当前位置:懂科普 >

IT科技

> jsp:multipleannotationsfoundatthisline怎么解决

jsp:multipleannotationsfoundatthisline怎么解决

index.jsp页面中出现:Multiple annotations found at this line,是设置错误造成的,解决方法如下: 1、首先项目右键,点击build path。 2、然后选择configure build path选项进入下一步。 3、接着在configure build path界面下找到,java buil

有的用户在创建JSP的时候出现了Multiple annotations found at this line,不清楚该如何解决,下面就告诉大家一个解决方法。

材料/工具

JSP电脑

方法

首先找到“Acsb”。

常见错误一 文件名与类名不同,不如我们的文件名为“A.java”。而我们编写程序的时候却写成了 public class a{ …… } 常见错误二 主方法中缺少关键词。比如void(无返回值)关键字,我们在编写程序的时候一定要注意,主方法一定不鞥少了这个关键字

jsp:multipleannotationsfoundatthisline怎么解决

然后右键,再点击“build path”,选择“configure build path”选项。

window-->preference-->MyEclipse-->Valdation-->将Manual和Build下复选框全部取消选择

jsp:multipleannotationsfoundatthisline怎么解决 第2张

在configure build path界面下找到“java build path”项,再找到“Libraries”。

你这个变量应该是试图从request得到,但是request对象里没有你说的那个变量,在jsp页之前的servlet里应该要有setAttribute这个方法,把你想要获得的变量名称和值添加进去 request.setAttribute("name",value); value可以是任何对象。也有可能一

jsp:multipleannotationsfoundatthisline怎么解决 第3张

然后在“Libraries”选项下的“Add Library”。

为避免页面乱码,charset你直接用户utf-8就可以了: 和你的开发工具设置的要一致

jsp:multipleannotationsfoundatthisline怎么解决 第4张

在“Add Library”下找到“server Runtime ”然后点击“next”,

你union的两个select语句里的字段要一致,就是后面的select 0,MonthName也要select 0 as sumje,MonthName as xsmonth

jsp:multipleannotationsfoundatthisline怎么解决 第5张

在“server Runtime”下,选择你的服务器,然后点击“finish”,错误就没有了。

可以将代码中的 换成${pageContext.request.contextPath} like this

jsp:multipleannotationsfoundatthisline怎么解决 第6张

扩展阅读,以下内容您可能还感兴趣。

JSP运行出错Multiple annotations found at this line:

你union的两个select语句里的字段要一致,就是后面的select 0,MonthName也要select 0 as sumje,MonthName as xsmonth

jsp页面为什么会显示Multiple annotations found at this line:的错误

出现了非法的标点符号导致语法错误,

jsp: Multiple annotations found at this line:- basePath cannot be resolved to a variable-basePath

可以将代码中的<%=basePath%>

换成${pageContext.request.contextPath}

like this

<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.js"></script>

JSP运行出错Multiple annotations found at this line:

你union的两个select语句里的字段要一致,就是后面的select 0,MonthName也要select 0 as sumje,MonthName as xsmonth

jsp页面为什么会显示Multiple annotations found at this line:的错误

出现了非法的标点符号导致语法错误,

标签: JSP
  • 文章版权属于文章作者所有,转载请注明 https://dongkepu.com/itkeji/on40gj.html