0
votes

I am writing an HTTP server using netty which will recive an http webservice request. Taking reference from the SnoopServer Example, I was able to get the request in my HTTP handler. Now should I write a backend servlet based application( for ex: using tomcat) to process that request or a should I handle that in my netty handler code either using switch case or something else?

Which approach is more suitable? If both are wrong, then is there any other approach?

1

1 Answers

0
votes

If you write a backend servlet application then what is the point of using Netty as a backend for your application ?

You could have used either one for receiving the HTTP requests and handling them. Since you are experimenting with Netty, you should handle the HTTP request inside the handler itself and then send out HTTP response from there only. Using tomcat would be an overkill.