Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp invoked repeatedly  RSS feed

 
Sangeeta Mahajan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am invoking a jsp(containing code of LDAP API) from a javascript function.
This jsp is getting invoked repeatedly. Can someone throw some light on the problem I am facing.
Note :The code in jsp takes around 1 hour of processing
Thanks,
Sangeeta
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yikes!
Any page that takes more than a few seconds to process should really protect against multiple clicks and attempts to refresh the page when it looks like it has "crashed".
One way to help prevent this is to immediately return some sort of "please wait" page while continuing the processing in the background.
Another way is to place a flag in the session context which indicates that a request is under way, and not start the long processing if that flag is found.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!