java +日食 +苹果雪:缺少 javax.servlet.*
我正在尝试编写一个简单的 java applet 程序,但似乎我缺少 javax.servlet.*
类定义。
使用:
- apple Snow
- Eclipse Java EE ide
我是否需要将特定的 JAR 文件添加到我的项目中?如果需要,是哪一个?
我安装了 Macports,以防 port 中的某些内容可能有帮助。
I'm trying to write a simple java applet program, but it seems that I'm missing the javax.servlet.*
class definitions.
Using:
- apple snow
- eclipse Java EE ide
Do I need to add a specific JAR file to my project and if so, which one?
I have Macports installed in case something from the ports might be helpful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这都是误解(Applet 与实际问题无关)和对 Eclipse 无知的结果(如果提供内置方法来无缝集成和链接两者,Java EE 变体已经已经 Tomcat 插件,您只需集成服务器并将其与 Web 项目关联)。
将来你应该更精确和详细地描述问题(因此不要像“......看起来......”那样说)。发布导致问题的相关代码片段。发布实际的错误消息(带有堆栈跟踪,如果有的话)。发布要完成的步骤以重现该问题。另请参阅:如何以聪明的方式提出问题。
我之前已经回答过几次如何开始使用 Eclipse+Tomcat+Servlet,你可能会发现它也很有用:
This is all result of misconceptions (Applets have nothing to do with the actual problem) and ignorance about Eclipse (if offers builtin ways to seamlessly integrate and link the one and the other, the Java EE variant has already a Tomcat plugin, you just have to integrate the server and associate it with the web project).
In the future you should be more precise and detailed about the problem (and thus not telling like "...it seems that..."). Post the relevant code snippet which caused the problem. Post the actual error message (with stacktrace, if any). Post the steps to accomplish to reproduce the problem. Also see: How To Ask Questions The Smart Way.
I've answered several times before how to get started with Eclipse+Tomcat+Servlets, you may find it useful as well:
感谢您所有有用的评论。
我安装了 tomcat 6,它包含缺少的 jar 以便编译项目。
加载 tomcat 应用程序的好插件:
Sysdeo Eclipse Tomcat Launcher 插件 - http://www.eclipsetotale.com /tomcatPlugin.html
使用 Netbeans,我只需创建一个新的 java Web 应用程序即可正确编译 tomcat 应用程序。现在我将坚持使用 netbeans,它还有一个很好的 GUI,用于连接到服务器并查看已安装的应用程序及其状态。
Thank for all of your helpful comments.
I installed tomcat 6 and it contains the missing jar in order to compile the project.
Nice plug-in to load tomcat applications :
Sysdeo Eclipse Tomcat Launcher plugin - http://www.eclipsetotale.com/tomcatPlugin.html
Using Netbeans i was able to properly compile tomcat applications just by creating a new java web application. for now i'll stick to netbeans, it also has a nice gui for connecting to the server and seeing the installed applications and their status.