tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berneburg, Cris J. - US" <>
Subject RE: Debugging
Date Thu, 02 Mar 2017 19:53:11 GMT

You may or may not find this helpful...

-----Original Message-----
From: Al Grant [] 
Sent: Sunday, February 26, 2017 8:34 PM
Subject: Debugging

> Hello,
> System: Windows 10
> Tomcat Var: 8.5.4
> IDE: Intellij Ultimate
> Java: v1.8
> I have started out creating war files. At the moment I am deploying by copying
> the war to the webapps directory and then using chrome to browse the URL.
> I am compling the war in Intellij, but starting tomcat seperately from the command line.
> I need to start to debug.
> I can connect the Intellij debugger to 8000 and I get some output that I have connected
> Connected to server
> Connected to target VM, address localhost:8000 etc
> What is not clear to me is :
> 1. How would I use a breakpoint? Intelijlets me set one but this is not honoured
> when I compile as war (in gradle) 2. Despite the servlet seeming doing the right
> thing (redirect) when I hit a submit button the println statements do not appear
> to write anything to either the CLI or the debugger.

I use IntelliJ Idea for one of my projects too.  The artifact generated is a JAR file, which
is invoked from the command line in Windows.  However, when debugging, I run the application
from inside IJ-Idea.

There may be a way to "attach to process" (similar to MS Visual Studio) in IJ-Idea, but I
have no idea how.

Also, be sure to set javac debug=true when compiling.  ;-)

> Code snippet:
> @Override
> protected void doGet(HttpServletRequest request, HttpServletResponse response)
>         throws ServletException, IOException {
>     System.out.println("doGet hit");
>     request.getRequestDispatcher("/index1.jsp").forward(request, response); }
>  ie - Index1.jsp gets loaded but the println statement doesnt seem to appear anywhere.
> Cheers
> Al

Cris Berneburg
CACI Lead Software Engineer

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message