org.apache.jasper.JasperException:无法为JSP maven项目编译类

时间:2017-06-19 07:16:32

标签: java maven jsp servlets

我创建了一个基于Maven web的项目。但是当我运行JSP文件时,我遇到了异常:

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 3 in the jsp file: /index.jsp
The method print(boolean) in the type JspWriter is not applicable for      the arguments (void)
1: <html>
2: <body>
3: <h2><% int i = 0;  %>Hello World!<%=out.println(i) %></h2>
4: </body>
5: </html>


Stacktrace:
   org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)

我没有包含servlet api jar,请找到附加的结构

enter image description here

请帮忙。

0 个答案:

没有答案