简体   繁体   English

eclipse juno导入eclipse indigo项目时出错

[英]eclipse juno error on importing a eclipse indigo project

Hi folks When I import a project created in eclipse indigo into eclipse juno then my servlet classes are not recognized by eclipse juno and it shows error on all servlet classes like HTTPServlet etc.What can I do now? 大家好,当我将在eclipse indigo中创建的项目导入eclipse juno时,eclipse juno无法识别我的servlet类,并且在所有servlet类(如HTTPServlet等)上显示错误。我现在该怎么办? But when I am creating a new dynamic project then servlets are working fine.It means it only unable to find servlet API path when I import any eclipse indigo project. 但是当我创建一个新的动态项目时,servlet运行良好,这意味着仅当我导入任何eclipse indigo项目时它才能找到servlet API路径。

Open the project's settings, the "java Build Path" tab. 打开项目的设置,“ java Build Path”选项卡。 Check if a appropriate runtime library for your servlet container is in the list. 检查列表中是否有适合您的servlet容器的运行时库。 I suspect not. 我怀疑不是。

If it is not missing, expand the library and check if there is a servlet.jar or servlet-api.jar. 如果没有丢失,请展开库并检查是否有servlet.jar或servlet-api.jar。

If it's missing, click the "Add Library..." button, select "server runtime", click next and choose one from the list. 如果丢失,请单击“添加库...”按钮,选择“服务器运行时”,单击下一步,然后从列表中选择一个。

If this list again is empty (probably), you need to configure a server runtime first. 如果此列表再次为空(可能),则需要首先配置服务器运行时。 To accomplish this, select window, preferences from the eclipse menu, go to "Server", sub menu "Runtime Environment" and add a suitable one. 为此,请从eclipse菜单中选择窗口,首选项,然后转到“服务器”子菜单“运行时环境”并添加一个合适的菜单。 Then add this to your projects build path. 然后将此添加到您的项目构建路径。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM