Luke Poskitt


Net::Tomcat::Connector - Utility class for representing Tomcat Connector objects


Net::Tomcat::Connector is a utility class for representing Tomcat Connector objects.

        use Net::Tomcat;

        # Create a new Net::Tomcat object
        my $tc = Net::Tomcat->new(
                                username => 'admin',
                                password => 'password',
                                hostname => ''
                or die "Unable to create new Net::Tomcat object: $!\n";

        # Print the Tomcat server version and JVM version information
        print "Tomcat version: " . $tc->server->version . "\n"
            . "JVM version: " . $tc->server->jvm_version . "\n";

        # Get all connectors as an array of Net::Tomcat::Connector objects
        my @connectors = $tc->connectors;

        # Print the connector names, and request and error counts
        foreach my $connector ( @connectors ) {
                print "Name: " . $connector->name . "\n"
                    . "Request Count: ".$connector->stats->request_count . "\n"
                    . "Error Count: ".$connector->stats->error_count . "\n\n"

        # Directly access a connector by name
        print "http-8080 error count: " 
                . $tc->connector('http-8080')->stats->error_count . "\n";



Constructor - creates a new Net::Tomcat::Connector. Note that you should not normally need to call the constructor method directly as a Net::Tomcat::Connector object will be created for you on invoking methods in parent classes.


Returns the connector name. Note that Net::Tomcat::Connector objects also use this method to implement stringification as an overloaded method.

        # Print the connector name
        print "My connector name: " . $connector->name . "\n";
        # Or
        print "My connector name: $connector\n";


Returns a Net::Tomcat::Connector::Statistics object containing statistics for the Tomcat connector.


Returns a Net::Tomcat::Connector::Scoreboard object containing the server scoreboard information for the connector.


Luke Poskitt, <ltp at>


Please report any bugs or feature requests to bug-net-tomcat-connector at, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


You can find documentation for this module with the perldoc command.

    perldoc Net::Tomcat::Connector

You can also look for information at:



Copyright 2015 Luke Poskitt.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See for more information.