简体   繁体   中英

Can't debug Java Servlet using JQuery ajax call on NetBeans

I'm trying to debug my JAVA project. During which, I'm trying to call a JAVA servlet (running on Apache Tomcat) using JQuery's ajax function. However, although I ran the JAVA project in debug mode, I'm unable to access the servlet's ProcessRequest function in Debug mode. I've checked the javascript code, and I do seem to get to the line where the AJAX call is being made, so I'm guessing there's something I'm missing on the IDE side.

Nothing happens on both the JSP and both the JAVA Servlet itself on the IDE side (Using Netbeans 7.2).

Is there any special thing I need to enable when debugging AJAX calls?

Is there anything I need to setup in the Tomcat side?

You have to debug in the listener that receives the AJAX request.

The JSP or servlet doesn't know or care anything about AJAX; it's just another HTTP request as far as it's concerned.

So if you're sure the call is being made, I'd say that you need to look at your debugging arrangement.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM