| Author |
Servlet is Not Requested After Initial Request
|
Steve Dyke
Ranch Hand
Joined: Nov 16, 2004
Posts: 1254
|
|
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
Joined: Jan 10, 2002
Posts: 56224
|
|
|
Have you used a debugger to determine if the load method is actually being called multiple times?
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Steve Dyke
Ranch Hand
Joined: Nov 16, 2004
Posts: 1254
|
|
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
Joined: Jan 10, 2002
Posts: 56224
|
|
|
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
Joined: Nov 16, 2004
Posts: 1254
|
|
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
Joined: Nov 16, 2004
Posts: 1254
|
|
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
Joined: Jan 10, 2002
Posts: 56224
|
|
|
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
Joined: Nov 16, 2004
Posts: 1254
|
|
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.
|
 |
 |
|
|
subject: Servlet is Not Requested After Initial Request
|
|
|