Java application windows not visible under Tomcat7

Posted on 2012-08-23
Medium Priority
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
  • 3

Author Comment

ID: 38365931
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

johnjbarryjr earned 0 total points
ID: 38433021
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

ID: 38433028
It turned out to be so simple!

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month13 days, 18 hours left to enroll

807 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