我创建了一个基于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,请找到附加的结构
请帮忙。