Netbeans 运行我的所有项目

发布于 2024-07-24 21:33:40 字数 440 浏览 2 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

苯莒 2024-07-31 21:33:40

据我所知,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 the Servers 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...

护你周全 2024-07-31 21:33:40

这听起来像是 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.

初见你 2024-07-31 21:33:40

确实很奇怪...我不认为这可能是 NetBeans 错误,因为 6.5 是一个稳定版本。 请仔细检查这些:

  • 您是否真的尝试过设置主
    明确项目? (右键单击
    项目并设置为主
    项目
  • 您确定没有课程吗
    或包依赖/关系
    你的项目?
  • 您是否创建了其中的每一个
    您的网络应用程序与新项目
    向导,或者他们实际上是
    你的项目中的类?
  • 你提到 Apache 不是
    包含在您的 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:

  • Did you actually tried to set a main
    project explicitly? (Right click on
    the project and Set as main
    project
    )
  • Are you sure that there are no class
    or package dependencies/relations on
    your projects?
  • Did you create every single one of
    your web apps with the new project
    wizard
    , or they are actually
    classes within your project?
  • You mention that Apache wasn't
    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.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文