Problems debugging servlets

I am evaluating 3.0.2.

I have a web application with 4 different servlets. There is a config servlet that has the load-on-startup value set to 1. I have another servlet with the load-on-startup value set to 2.

I've set break points in both servlets and I can see that the first servlet is being init'ed first, but the second servlet's init is called before the first finishes. According to the servlet spec this is illegal. I would think this is just a Tomcat issue (using 4.0.3), but when I run the same application under JBuilder or just start Tomcat manually everything works fine.

Is there something I am doing wrong with IDEA that would cause this problem?

-Jason

4 comments

Hi Jason,

I've set break points in both servlets and I can see that the first servlet is being init'ed first, but the second servlet's init

is called before the first finishes.

What makes you think so?

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"



0

I have verified this two ways:

1) with log statements. I can see the first servlet start to execute (with a log statement) and then the 2nd servlet starts (which I can verify with a log statemnt) before another log statement executes in the first servlet.

2) With two breakpoints set. As I am stepping through the first servlet the 2nd servlet will start to execute. I hit F8 in the first servlet and then the debugger will break on the second servlet.

0

What if turn on the "suspend All threads" button on the debugger toolbar? In its default state it suspends only the thread that hit
a breakpoint.

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"


0

That worked! Thank you very much.

0

Please sign in to leave a comment.