Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is it possible to call popup from action class?

 
Krish Khan
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hello !

Is it anyway possible to call popup window from action.

I am using Struct 1 framework.


Thank You!
 
Joe Ess
Bartender
Posts: 9312
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not directly, no.
A Struts application runs on the server, so it can't trigger events in the user browser. That said, you can use JavaScript in your JSP to trigger a popup, and you can write JavaScript code via Struts into the JSP before it is returned to the client browser. Another strategy would be to use JavaScript to call an action and call a popup with the result (commonly referred to as AJAX).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic