Solved

Problems with apache tomcat and JOptionPane.showConfirmDialog

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

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

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

Suggested Solutions

There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three thingsā€¦
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
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 synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

830 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