Solved

Problems with apache tomcat and JOptionPane.showConfirmDialog

Posted on 2008-06-11
2
578 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
2 Comments
 
LVL 26

Accepted Solution

by:
ksivananth earned 125 total points
Comment Utility
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
Comment Utility
We will use javascript to get the popup, thank you very much for your help!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

-Xmx and -Xms are the two JVM options often used to tune JVM heap size.   Here are some common mistakes made when using them:   Assume BigApp is a java class file for the below examples. 1.         Missing m, M, g or G at the end …
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
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 new code templates in NetBeans IDE 8.0 for Windows.

762 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

10 Experts available now in Live!

Get 1:1 Help Now