简体   繁体   中英

How to debug Spring MVC tomcat application?

I am trying a spring MVC application on tomcat server..

I am always getting the error as resource not found( please see the question if you have time )..I think there is some problem with the view resolver..

I want debug this application to know where i am doing wrong...

Is that possible?

I don't know if it is a lame question for senior developers :)

If you are using Eclipse, you can add Tomcat runtime in preferences and add new server in servers view in eclipse. Then you can run the server in debug mode.

Also you can attach source code for jar files(in your case spring jars) in eclipse so that when you debug it will load proper source files.

I would set the logging level of DispatcherServlet to DEBUG and see what it says. Spring contains mostly good logging at DEBUG level to tell you what's going on (despite that it's INFO level is nigh-useless).

If DispatcherServlet 's logging doesn't say much, try some of the other classes you have configured in your application (do one at a time or you'll get overwhelmed with log messages)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM