• 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
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Tomcat Add and Remove  RSS feed

 
Ranch Hand
Posts: 1262
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?

 
Bartender
Posts: 20125
103
Android Eclipse IDE Linux
  • 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: 1262
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
Bartender
Posts: 20125
103
Android Eclipse IDE Linux
  • 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.
 
What's that smell? Hey, sniff this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!