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.
currently it only tests that something responds, so that if there is another type of server with the same address/port (can easilly happen for S1AS PE) it is wrong.
will try to fix for 3.6
manager/serverinfo gives an output like this: OK - Server info Tomcat Version: Apache Tomcat/5.5.4 OS Name: Windows XP OS Version: 5.1 OS Architecture: x86 JVM Version: 1.5.0_01-b08 JVM Vendor: Sun Microsystems Inc. Should be possible to check and display error; this would be very useful in detecting port conflicts. It would be worth checking what app server plugin does when tomcat runs on the same port. One more tip: add a note to plugin writer's docs in j2eeserver.
Even more reliable way how to check the status would be to use the "list" command. We would get a list like this: OK - Listed applications for virtual host localhost /manager:running:0:/opt/netbeans/enterprise2/jakarta-tomcat-5.5.7/server/webapps/manager ... We could then compare the CATALINA_HOME directory with where the manager application is deployed and CATALINA_BASE directory in case that there has been already some web application deployed. The problem with both of these solutions (list and serverinfo) occurs when there are two Tomcat installations configured with the same port. In such case, when we try to check the status of the not running Tomcat, an authentication dialog will be displayed since we tried to pass the username and password of the not running Tomcat, which naturally was not accepted by the Manager application of the other - running - Tomcat. I suppose that none of these solutions would not help to improve user experience and thus it doesn't make much sense to implement it. IMO, we will not be able to improve this running check, unless we dropped the support for server started outside the ide, which is not on the radar. Pavel, Karel do you agree to close this as WONTFIX?
Failed authentication means that it is not (most probably) the right server. We could supress authentication dialog in such case and try next server. Seems to me still solvable (although probably more complicated).
TM -> 5.0
Running test now checks whether it is really Tomcat what is running on the given port, the test is based on the http response headers. It is, however, still not possible to distinguish between the two Tomcat instances. F. Checking in src/org/netbeans/modules/tomcat5/TomcatManager.java; /cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/TomcatManager.java,v <-- TomcatManager.java new revision: 1.80; previous revision: 1.79 done Checking in src/org/netbeans/modules/tomcat5/TomcatManagerImpl.java; /cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/TomcatManagerImpl.java,v <-- TomcatManagerImpl.java new revision: 1.44; previous revision: 1.43 done Removing src/org/netbeans/modules/tomcat5/URLWait.java; /cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/URLWait.java,v <-- URLWait.java new revision: delete; previous revision: 1.5 done Checking in src/org/netbeans/modules/tomcat5/ide/Bundle.properties; /cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/ide/Bundle.properties,v <-- Bundle.properties new revision: 1.33; previous revision: 1.32 done Checking in src/org/netbeans/modules/tomcat5/ide/StartTomcat.java; /cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/ide/StartTomcat.java,v <-- StartTomcat.java new revision: 1.79; previous revision: 1.78 done Checking in src/org/netbeans/modules/tomcat5/nodes/TomcatWebModuleChildren.java; /cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/nodes/TomcatWebModuleChildren.java,v <-- TomcatWebModuleChildren.java new revision: 1.10; previous revision: 1.9 done Checking in src/org/netbeans/modules/tomcat5/util/Utils.java; /cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/util/Utils.java,v <-- Utils.java new revision: 1.4; previous revision: 1.3 done
VERIFIED