happy happy - 8 months ago 50
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?


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.