Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet is Not Requested After Initial Request

 
Steve Dyke
Ranch Hand
Posts: 1706
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following js that is called several places in my jsp files however the sevrlet only responds on the initial call.

js code


Servlet code
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you used a debugger to determine if the load method is actually being called multiple times?
 
Steve Dyke
Ranch Hand
Posts: 1706
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Have you used a debugger to determine if the load method is actually being called multiple times?


The alert message pops up every time it is just the load that does not fire but on the initial call. It is like the servlet gets cached but I thought the code I have in my servlet would prevent this.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, drop the alerts -- they are not a valid debugging mechanism. Open the JavaScript console and use console.log() to log to the console without interrupting the execution thread.
 
Steve Dyke
Ranch Hand
Posts: 1706
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:First, drop the alerts -- they are not a valid debugging mechanism. Open the JavaScript console and use console.log() to log to the console without interrupting the execution thread.


I am using WebSphere as my development environment. I run in the IE8 browser. Everything in my app run in div tags so the code is difficult to see runing. I have started the app, opened the Developer Tools in IE, clicked the Script option. Where do I go from there?
 
Steve Dyke
Ranch Hand
Posts: 1706
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:First, drop the alerts -- they are not a valid debugging mechanism. Open the JavaScript console and use console.log() to log to the console without interrupting the execution thread.


Never mind. Sorry but I found my mistake. After initialy loading the div tag which had a div tag embeded(every thing worked) I later reloaded the div tag but did not include embeded div tag that held the progress bar.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But keep in mind the thing about alerts. Don't use them. They interrupt the execution thread and are a poor way to debug.
 
Steve Dyke
Ranch Hand
Posts: 1706
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:But keep in mind the thing about alerts. Don't use them. They interrupt the execution thread and are a poor way to debug.


Thanks, I still have so much to learn.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic