Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Problems with apache tomcat and JOptionPane.showConfirmDialog

Posted on 2008-06-11
2
Medium Priority
?
601 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 500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses

886 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