Solved

Problems with apache tomcat and JOptionPane.showConfirmDialog

Posted on 2008-06-11
2
584 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
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

-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 …
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

776 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