Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Tomcat Add and Remove  RSS feed

 
Ranch Hand
Posts: 1327
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am trying to debug a method within a Class annotated with the @RestController.

I try to Add the project to the Tomcat 8 server but is says there are not projects to be added.

I am debugging th same way as with a Java File without @RestController.

Is my proceding correct?

 
Saloon Keeper
Posts: 20657
122
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you are confusing your IDE with Tomcat. Your terminology doesn't make any sense for a Tomcat application and Tomcat doesn't work with "projects", it works with web applications (which aren't "added", they're "deployed").
 
Angus Ferguson
Ranch Hand
Posts: 1327
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I meant a web application (Spring Boot).

From the main  class @SpringBootApplication, it scan a component which contains a  @RequestMapping annotation, it reaches it well but I would like to debug  the content of the method reached...it just doesnt debug even when the local Tomcat is in debug mode.
 
Tim Holloway
Saloon Keeper
Posts: 20657
122
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the case of Spring Boot, Tomcat is embedded within the Spring Boot framework. So to use a debugger, you have to start the Spring Boot application with debugging enabled.

I'm not sure what you mean by "Tomcat debugging enabled" for that reason. When Tomcat runs stand-alone, the startup script (catalina.sh/catalina.bat) adds remote debug options to the JVM execution command line that it builds. In the case of an embedded Tomcat, you'd have to start whatever JVM runs the app that has Tomcat (and the webapp) embedded within it with JVM debug options. I've never played with Spring Boot to that degree, though, and if you have an IDE plugin, it may have options of its own.
 
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!