happy happy - 1 year ago 125
Java Question

JOptionPane in struts?

I am using below code to display dialog box:

if(query.contains(tab)) {
JOptionPane.showMessageDialog(null,"Owner does not have privileges to access given table");

But I guess
wont work in struts. So how to display dialog box in struts?

Can I use
in struts?

Answer Source

Of course you can't use JOptionPane in Struts. Struts runs at server-side. JOptionPane would display a Swing dialog on the web server screen, not in the client's browser.

To display a dialog box in a browser, you need JavaScript. You could use jQuery-UI for example.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download