[英]Eclipse jsp error in editor
我在jsp文件中遇到錯誤(在X行上),但這一切似乎都是正確的。
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<form method="GET"
X action="${pageContext.request.contextPath}/docreatetask">
<table>
<tr>
<td>Task</td>
<td><input name="task" type="text" /></td>
</tr>
<tr>
<td>Description</td>
<td><input name="description" type="textarea" /></td>
</tr>
<tr>
<td>Deadline</td>
<td><input name="description" type= /></td>
</tr>
<tr>
<td></td>
X <td><input name="Create new task" type="submit" /></td>
</tr>
</table>
</form>
</body>
**Error 1** javax.servlet.ServletException can not be resolved
**Error 2** javax.servlet.http can not be resolved
會是什么呢? 它在任何地方都使用ServletException或javax.servlet.http嗎?
對於您的第一個錯誤( java.servlet.http can not be resolved to a type
),您需要將servlet-api.jar
文件放在`classpath中:
為此,請按照以下步驟操作:
servlet-api.jar
文件 對於您的第二個錯誤:( javax.servlet.ServletException can not be resolved
):
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.