eclipse 删除带有 web.xml 条目的 servlet
我正在使用 Eclipse 的 New->Servlet 向导,从而为我准备好了自动生成的 servlet 和 servlet 映射条目。但是,当我选择 servlet 的 java 文件并将其删除时,web.xml 中的相应条目不会被删除。
我该怎么做?
am using Eclipse's New->Servlet wizard thereby having auto-generated servlet and servlet-mapping entries ready for me. But when I select a servlet's java file and delete it, the corresponding entries in web.xml don't get deleted.
How do I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想只需编辑
web.xml
文件并删除条目即可。根据设计,当您删除 servlet 时,它们可能不会自动删除。I would imagine just edit the
web.xml
file and delete the entries. It's likely by design that they are not automatically deleted when you delete the servlet.使用注释怎么样?您无需为此处理 web.xml 中的任何配置。
How about using Annotations? You don't have to take care of any configuration in web.xml for this.