• 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Tomcat Add and Remove

 
Ranch Hand
Posts: 1402
3
Netbeans IDE Spring Java
  • 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: 22273
151
Android Eclipse IDE Tomcat Server Redhat Java 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: 1402
3
Netbeans IDE Spring Java
  • 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: 22273
151
Android Eclipse IDE Tomcat Server Redhat Java 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.
 
Tell me how it all turns out. Here is a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic