I want to understand the flow of Jersey framework - when we hit an URL for jersey server, we send the HTTP request. The request is in the form of HTTP protocol, with headers and body etc. This request must be getting converted to HttpRequest object that Java understands. So I wanted to debug Jersey for how it is done exactly.
Also how Jersey understands that which application is to be invoked, Does it maintain some registry with all the URL mappings and their respective application contexts? If yes, then when and how these are initialised?
I have tried Logging but it only gives me the information about incoming URL, connection details etc. But how can we enable the Info logs of jersey-core
, jersey-server
, jersey-servlet
jars?
Any suggestions are welcome, Thank you!
UPDATE:
I found this very informative link about Web Server Functioning.
Also, as @Marcel Dias pointed out, I should have looked into the Web Servers for questions related to web application loading. I enabled the server(Tomcat in my case) logging and got a clearer picture of web server working.
As for the Jersey working - annotation
parsing part, I debugged Jersey with the starting point com.sun.jersey.spi.container.servlet.ServletContainer
class.
I think you will find your answers in the Jersey monitoring & tracing documentation
And to understand how the Jersey App receive the Java HttpRequest you need to look into your web server, like tomcat, jetty, etc..