Java application windows not visible under Tomcat7

Posted on 2012-08-23
Last Modified: 2012-09-25
For years we have been using the (now deprecated) invoker servet in Tomcat 6 to launch our Java application.  When RobotRequestHandler.init(...) is called in our Java application, it instantiates our main class which displays the windows we use to monitor incoming requests.  I attached our web.xml file for reference.

We are dealing with the elimination of the invoker servet in Tomcat 7.

For Tomcat 7, we added the annotated web listener shown below, which is being called when starting Tomcat 7. We know our application is running by observing logging from its main event loop.

The problem is that none of our AdPerks.jar windows are visible under Tomcat 7!

Our application is C:\Tomcat7\webapps\adperks\WEB-INF\lib\AdPerks.jar and works fine when it is launched outside of Tomcat 7 (by simply double-clicking AdPerks.jar).

We also verified that the same AdPerks.jar running under Tomcat 6 still displays our windows.

What is causing our (JFrame) windows to not be visible when running under Tomcat 7?

public class InvokerListener implements ServletContextListener
      public void contextInitialized(ServletContextEvent sce)
            ServletContext sc = sce.getServletContext();

            ServletRegistration.Dynamic dynamic = sc.addServlet("bwRobotRequestHandler", RobotRequestHandler.class);


      public void contextDestroyed(ServletContextEvent sce) { }
Question by:johnjbarryjr

    Author Comment

    If someone would be kind enough to post a comment about why this question has been avoided for over a week, perhaps that alone would give us some ideas.

    Accepted Solution

    We discovered the solution.

    Problem:  Clicking the Start button in the "Monitor Tomcat" dialog (i.e. the /Tomcat7/bin/Tomcat7w.exe application) launched our @WebListener class but would not display any windows or dialogs to interact with our program.

    Solution:  We double-clicked the /Tomcat7/bin/Tomcat7.exe application.  That launched our @WebListener class as before, but now all our windows and dialogs are visible!

    Author Closing Comment

    It turned out to be so simple!

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
    Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now