You can use Boost Asio to write a simple C++ client or server application listining to some port and transfer data to your tomcat server (or any other server long as it uses standard protocols). Boost asio can be used to do any kind of network programming that you want. It is somehow a low level library for network programming in C++.
you can start by using one of examples from this page:
http://www.boost.org/doc/libs/1_54_0/doc/html/boost_asio/examples/cpp03_examples.html