I am using below code to display dialog box:
JOptionPane.showMessageDialog(null,"Owner does not have privileges to access given table");
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.