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.

Bug 160392

Summary: Netbeans don't detect started Tomcat.
Product: serverplugins Reporter: space_center <space_center>
Component: TomcatAssignee: Petr Hejl <phejl>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description space_center 2009-03-16 18:00:43 UTC
Hello, sorry for my English.
When Tomcat started, netbeans 6.5 don't see it. Tomcat don't send answer on request.

There are error in method org.netbeans.modules.tomcat5.util.Utils.pingTomcat()

If in this method replace this string:

out.println("HEAD /netbeans-tomcat-status-test HTTP/1.1\nHost: localhost:" + port + "\n"); // NOI18N

on these strings:
out.println("HEAD /netbeans-tomcat-status-test HTTP/1.1\nHost: localhost:" + port); // NOI18N
out.println();

Then method works fine.
Comment 1 abhijitsulhyan 2010-10-02 14:48:16 UTC
thanks for saving time. I recognized readLine doesn't picks up the proper line to parse the host and port information.

Additionally, this error is not consistent with plain J2EE application, I got this when I was using Restlet libraries at start up(though I am skeptical about its use to mess up the new line character) 

(In reply to comment #0)
> Hello, sorry for my English.
> When Tomcat started, netbeans 6.5 don't see it. Tomcat don't send answer on
> request.
> 
> There are error in method org.netbeans.modules.tomcat5.util.Utils.pingTomcat()
> 
> If in this method replace this string:
> 
> out.println("HEAD /netbeans-tomcat-status-test HTTP/1.1\nHost: localhost:" +
> port + "\n"); // NOI18N
> 
> on these strings:
> out.println("HEAD /netbeans-tomcat-status-test HTTP/1.1\nHost: localhost:" +
> port); // NOI18N
> out.println();
> 
> Then method works fine.
Comment 2 Petr Hejl 2011-02-08 13:59:27 UTC
Fixed in web-main 4c85d17ac386 and 6225c56ea4a8.
Comment 3 Quality Engineering 2011-02-09 06:06:41 UTC
Integrated into 'main-golden', will be available in build *201102090000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/4c85d17ac386
User: Petr Hejl <phejl@netbeans.org>
Log: #160392 Netbeans don't detect started Tomcat.