|One of my friends asked how to debug a Servlet deployed on Java Application Platform SDK Update2. Debugging Servlet is no different than debugging any application on the Application Server. However searching on java.sun.com gave really old results. Top-level Search functionality is missing on glassfish.dev.java.net which hopefully will be fixed soon. Googling finally showed Debugging Applications but this is again command-line. So I decided to write a short blog describing the simple steps involved to debug a server-side application using NetBeans/GlassFish. Application Platform SDK Update2 contains Sun Java System Application Server 9.1 Beta2 which is equivalent to GlassFish V2 b41d.|
Runtime' Server, then you need to start the Application Server in debug mode by right-clicking on the Server instance and selecting 'Start in Debug Mode'.
index.jsp'. However if you need to debug your own Servlet then you need to configure it as the default page by right-clicking on Project, selecting Properties, Run category and specify the relative URL of the Servlet as shown below ('
/NewServlet' in this case):
Debug Project' as shown below:
processRequest' method and watch the debug output in '
Debugger Console', '
Local Variables', '
Call Stack' and much more.
Check NetBeans Debugging Applications for more information.