• Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing a variable of a jsp page to a setTimeout method.

 
Saumyaraj Zala
Ranch Hand
Posts: 75
AngularJS Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to a jsp page to be submitted automatically after a particular time interval whose value comes from database.How can i pass this time to setTimeinterval of javascript?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First move the Java code out of the JSP and into the page controller servlet. Then determine what the timeout value should be and add it to the request as a scoped variable. Then you can simply use the EL to place the value in the page at the appropriate place in the call to setTimeout().
 
Saumyaraj Zala
Ranch Hand
Posts: 75
AngularJS Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankyou :).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!