Netbeans 运行我的所有项目
我正在使用 Netbeans 6.5.1(包括 tomcat 6.0.18)
我在 netbeans 上开发了许多 webapp 项目。 我为每个 web 应用程序创建了一个上下文侦听器,它打印“Hello World!这是 <>” 在 contextInitialized 方法中。
每当我单击“运行主项目”按钮(或在项目上单击鼠标右键并选择“运行”)时,我可以在 tomcat 的输出窗口中看到所有其他项目也在运行。
我的意思是,当我运行一个项目(任何项目)时,我可以看到我的所有 Web 应用程序都调用它们各自的上下文侦听器! 最糟糕的情况是当 web 应用程序使用 hibernate 时:每个 web 应用程序都会执行所有相关的 hibernate 初始化工作。
有没有办法只运行我想要的项目?
我已经尝试关闭其他项目,但这不起作用。
I'm using Netbeans 6.5.1 (tomcat 6.0.18 included)
I've developed many webapp projects on netbeans.
I created a contextlistener for each webapp which prints "Hello World! this is <>" in contextInitialized method.
Whenever I click "Run main project" button (or click-right-mouse-button over a project and select "Run") I can see in tomcat's output window all my other projects are running as well.
I mean, when I run a project (any project) I can see that all my webapps call their respective context listener! the worst scenario is when a webapp uses hibernate: each webapp do all the related hibernate initialization work.
Is there any way to run only the project I want?
I already tried closing the other projects but that doesn't work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
据我所知,Netbeans 并不总是从开发 tomcat 服务器中取消部署其他 Web 应用程序。
要删除其他项目,请转到“服务”(以前称为“运行时”)选项卡。 展开
服务器
组。 右键单击 Tomcat 服务器实例并选择“启动”(如果它尚未运行)。 展开 Tomcat 服务器组——它应该列出所有已部署的应用程序。 右键单击每个应用程序并选择取消部署。我是凭记忆写的,所以如果我的指示有误,请原谅我......
From what I recall, Netbeans does not always un-deploy your other web applications from the development tomcat server.
To remove the other projects, go to the
Services
(formerly Runtime) tab. Expand theServers
group. Right click the Tomcat Server instance and select Start (if it's not already running). Expand the Tomcat Server group--it should list all of the deployed application. Right click each application and select Undeploy.I'm going from memory so please forgive me if my instructions are off...
这听起来像是 NetBeans 的错误。 您可以尝试使用 NB 6.7 RC 3 来查看问题是否已解决。
This sounds like a NetBeans bug. You could trying using NB 6.7 RC 3 to see if the problem has been fixed already.
确实很奇怪...我不认为这可能是 NetBeans 错误,因为 6.5 是一个稳定版本。 请仔细检查这些:
明确项目? (右键单击
项目并设置为主
项目)
或包依赖/关系
你的项目?
您的网络应用程序与新项目
向导,或者他们实际上是
你的项目中的类?
包含在您的 NetBeans 中。 你是否
自己安装应用服务器吗?
如果是这样,您应该检查您的服务器
文档并尝试检查
配置文件。
Really strange indeed... I don't think this can be a NetBeans Bug since 6.5 it's an stable version. Please, double check these:
project explicitly? (Right click on
the project and Set as main
project)
or package dependencies/relations on
your projects?
your web apps with the new project
wizard, or they are actually
classes within your project?
included with your NetBeans. Did you
installed the app server by yourself?
If so, you should check your server
documentation and try to check the
configuration files.