I've searched the web and Slack and failed to figure out how to serve a standard Servlet from a Java library under a router/server started by Ring. It seems this question comes up every now and again, but as a newbie I couldn't assimilate any partial answers into a final one
I know the other way around is made easy via the servlet util functions in Ring
maybe I just make an annotated WebServlet class and Jetty will find it ?!
ring's jetty adapter does produce a standard contexthandler which I think has a mount-like thing after it started think_beret
It depends on the adapter being used. If you use the default Jetty adapter, you get back a Jetty Server object. Once you've got that, I believe you can use insertHandler to wrap Ring's Jetty handler class in a HandlerWrapper , and then you can use setHandler on that wrapper to add a ServletHandler, and then finally to use addServletWithMapping.
So, got the Servlet -classed object, made a org.eclipse.jetty.servlet.ServletHandler and a org.eclipse.jetty.servlet.ServletHolder , added the servlet to it, stopped the server, .setHandler on it and restarted. The insertHandler I imagine will both make it ergonomic to keep the original handler and not have to restart but I didn't experiment that far yet, just saw that the above was working
oh and yeah, addServletWithMapping
Hi, I've question related ring and the related libraries
I guess once Ring 1.11 has been released I can go through and update them. But why does it matter? If you're using those libraries presumably you also have a Ring dependency in your project anyway, and that will override the older dependencies in those libraries.
Any reason the library Ring JSON/0.5.1 is not updated with ring-core currently used version is 1.9.2 ring-headers/0.3.0 is not updated with ring-core currently used version is 1.6.0
They just haven't been updated yet.
do you have any plans to release it in near future?