Re: <p>Debugging servlets using Jbuilder Professional</p>
Posted By:
harald_braun
Posted On:
Friday, October 12, 2001 03:16 AM
You must execute JBuilder as a servlet engine using your servlet source code.
Step1) Go to Project >> Project Properties. Ensure your Source Path points to your servlet code. e.g. c:/servlet/src
Step2) Set your Output Path and Working Directory to e.g. c:/servlet.
Step3) Ensure all required libraries e.g. servlet.jar are included in Required Libraries.
Step4) Compile the code.
Step5) Again, go to Project >> Project Properties >> Run tab >> JSP/Servlet tab>> Server Options tab. Ensure the server is Tomcat (v3.1, 3.2 or 4).
Step6) Set the host name to your machine name e.g. MyPc, I use port 80 (ensure PWS or other web services using port 80 are suspended), Document Base c:/servlet BUT keep the context path empty! (unless you are deploying a web-app, war file).
Step7) Go to Run >> Debug Project. This should start Tomcat with your compiled servlet code in c:/servlet. Set a breakpoint in doGet() and use a browser to call the servlet URL e.g http://MyPc/servlet/testServlet.
Hope this helps...
Harald