• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP refresh calling action class method automatically

 
trupti nigam
Ranch Hand
Posts: 627
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I am having a JSP page which will have a hidden button. The JSP is refreshed after every 3 seconds and whenever the JSp is refreshed the hidden button action method (processButtonPressedEvent)in the action class should be called automatically. Is this possible in struts? and if it is possible how to implement it.I mean how do I indicate the button pressed event as in real nobody is going to press that button but the JSP refeshing should call that method automatically.

thanks,
Trupti
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34965
378
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Trupti,
What does pressing that button do in JSF? Does it call Javascript? If so, you could call the javascript function using the onLoad function.
 
trupti nigam
Ranch Hand
Posts: 627
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne,

The button click should call the method in the action class.Like the processButtonClickEvent(Written by me).It will not do any javaScript realted stuff.
Every time the JSP is refreshed,in this case after 3 seconds the action class processButtonClick event should be called automatically.This method in turn does some dataBase query to check a particular column value.

How do I implement the above so that whenever the JSp is refreshed the action class method should be invoked automatically.

Thanks,
Trupti
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic