Solved

Problems with apache tomcat and JOptionPane.showConfirmDialog

Posted on 2008-06-11
2
592 Views
Last Modified: 2013-12-15
Hi everybody

I have an issue with tomcat 5.5 and JOptionPane.showConfirmDialog, When I run the application using the apache tomcat running from eclipse, I get the popup launched for the JOptionPane.showConfirmDialog, runs fine.
However when I run the application using apache tomcat out of eclipse, the popup is not launched.

My environment is the following: From a JSP, I'm calling a java program and on this one, we are calling the JOptionPane.showConfirmDialog code.

This is my code lines:

int c = JOptionPane.showConfirmDialog(new JFrame(), "message "
                              +" Do you accept?",null,
                              javax.swing.JOptionPane.YES_NO_OPTION);
                  if (c == JOptionPane.YES_OPTION) {
                        time_wanted = (availableTime - 1);

Could you please help me?

thanks.

0
Comment
Question by:cdtcol
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 26

Accepted Solution

by:
ksivananth earned 125 total points
ID: 21761019
If the system you are running tomcat has graphics env, it will be opened there or you need to configure a graphics env to that for e.g., XWindow!

but what is the point of displaying this dialog in the server? if you want to show something in the browser and mistakenly used Joptionpane... check with javascript code for displaying dialog!
0
 

Author Closing Comment

by:cdtcol
ID: 31466198
We will use javascript to get the popup, thank you very much for your help!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

623 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