This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I have 2 web projects simultaneously open and configured to use the same Tomcat instance. But, in all recent NetBeans versions (at least from 5.0 upwards), it is impossible to deploy both applications to the same server: 1. start the server 2. deploy the first application from its project right-click menu: the application is brought up 3. deploy the second application from its project right-click menu: the first application is automatically undeployed and the second is brought up; the following message appears in console: Undeploying ... undeploy?path=/app1 OK - Undeployed application at context path /app1 In-place deployment at C:\projects\app2\nbprj-std\build\web OK - Deployed application at context path /app2 OK - Started application at context path /app2 If you then try to deploy the first application, same thing happens: the second application gets undeployed. Of course, it is possible to configure another Tomcat instance and run the second application in it, but for obvious reasons running a server instance per application is inefficient.
I cannot reproduce this behavior, marking as INCOMPLETE. When I create two new web projects app1 and app2 and then I deploy them without any modification both applications are accessible on the server as expected. Have you modified somehow the standard NetBeans project structure? Can you please describe exact steps how to reproduce this behavior - what exact modification have you made in the project configurations, if any?
Indeed, I have tried creating 2 new projects and deploying them - it works. And yes, I have made modifications to the projects structure in order to adapt NetBeans to the directory layouts of existing projects. I am going to try making these modifications one-by-one on the new project in order to see, what triggers the bug.
Here's how I managed to reproduce the bug: 1. create the following directory layout somewhere on the disk: app3 |--nbprj |--web |--java |--content |--WEB-INF |--web.xml 2. in NB, use "New Project" wizard to create a new web project with existing sources, select app3 as the root, app3/nbprj as the project folder, app3/web/java as a source dir and app3/web/content as the web content dir 3. repeat the above steps to create a new project named app4 4. try deploying both projects into the same Tomcat instance To fill web.xml with some valid content before creating the projects, you can use the following: <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> </web-app>
Thanks for the steps. Removing the INCOMPLETE keyword, since I am now able to reproduce the issue. Setting the TM to 6.0. The problem seems to be that both projects use the same project folder name, using nbprj1 and nbprj2 seems to workaround the issue.
Seems like it's fixed?
I am not aware of any changes in this area, so unless you cannot reproduce it anymore the issue is probably still there.
The issue is still reproducible
This is a major problem when you are using multi-module maven projects - since by definition they will have the same project folder name.
bad tm value... reset to tbd
*** Issue 163509 has been marked as a duplicate of this issue. ***
This seems to be caused by DeploymentTargetImpl.getTargetModuleFilename() logic.
Perhaps introduced by this http://hg.netbeans.org/main/rev/15966.
Fixed in web-main e0ffaafc7d90.
Integrated into 'main-golden', will be available in build *200905070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/e0ffaafc7d90 User: phejl@netbeans.org Log: #96587 Make it possible to deploy several webapps simultaneously
*** Issue 139879 has been marked as a duplicate of this issue. ***