-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add servlet support #314
add servlet support #314
Conversation
I think this would be better tested in a third-party library first. |
This adapter has been used for almost two years in my company, it use the same tricks:
|
What's your reasoning for including this change in the Ring Jetty adapter itself if there is a third-party adapter already available? Do you believe it's a common enough use-case to include an option for? Have you considered other solutions, such as converting a Java servlet into a Ring handler? |
Well, the adapter I referred is mainly to be used with hystrix, what if you have another servlet? Maybe write another adapter. And I have done this when using druid's StatViewServlet. Converting a Java servlet into a Ring handler is indeed another solution, and I have done this several times when port a Java web application into a Ring-based one. I'm not sure if sevlet-mapping integration is common for others, I just want this feature now and then. |
Could this be achieved instead with the existing |
I can't image what a general function converting servlet into a handler look like, after all it's servlet that does the real business, turning a request map to a HttpServletRequest is reasonable, but not otherwise. |
One possibility is that we provide an option to allow the adapter to include the servlet keys that are already added when a handler is compiled into a servlet. Given this, converting a servlet into a handler becomes more straightforward. I'm leery about adding a |
OK, I get your point. |
ref: weavejester/compojure#176
Add a new option to define servlet mapping