简体   繁体   English

Eclipse找不到javax.servlet.http.HttpServlet

[英]Eclipse cannot find javax.servlet.http.HttpServlet

I am using GWT with AppEngine on Eclipse. 我在Eclipse上将GWT与AppEngine一起使用。 When I try to build a simple Servlet, Eclipse keeps complaining that javax.servlet.http.HttpServlet " cannot be found in source packages ". 当我尝试构建一个简单的Servlet时,Eclipse一直抱怨javax.servlet.http.HttpServlet “在源包中找不到”。

How can I get Eclipse happy? 如何让Eclipse开心?

updated: found the problem: it seems Eclipse with the GWT pluging would rather have server-side code in a .server package. 更新:发现了问题:似乎使用GWT插入的Eclipse宁愿在.server软件包中包含服务器端代码。

确保gwt sdk中的gwt-user.jar在构建路径上。

您可以使用maven并向servlet-xxx jar(例如servlet-api-2.4.jar)添加依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 javax.servlet.http.HttpServlet 缺失 - javax.servlet.http.HttpServlet missing 找不到javax.servlet.http.HttpServlet“ - javax.servlet.http.HttpServlet" was not found 即使存在 maven 依赖,也未找到 javax.servlet.http.HttpServlet - javax.servlet.http.HttpServlet was not found even if maven dependency exists GF4 javax.servlet.http.HttpServlet的OSGI包-ClassNotFound - OSGI bundle for GF4 javax.servlet.http.HttpServlet - ClassNotFound 使用javax.servlet.http.HttpServlet处理PATCH请求? - Handling PATCH requests with javax.servlet.http.HttpServlet? 更改javax.servlet.http.HttpServlet中的响应代码 - Change response code in javax.servlet.http.HttpServlet 引起:java.lang.ClassNotFoundException: javax.servlet.http.HttpServlet - Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServlet 在 Java 构建路径上找不到超类“javax.servlet.http.HttpServlet” - The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path servlet容器是否应为每个传入请求创建新的javax.servlet.http.HttpServlet实例? - Should a servlet container create new javax.servlet.http.HttpServlet instance for each incoming request? javax.servlet.http.HttpServlet中是否有办法弄清楚在运行时调用哪种方法 - Is there a way in javax.servlet.http.HttpServlet to figure out which method is called at runtime
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM