Hi, Am 14.11.2012 um 00:43 schrieb Sarwar Bhuiyan:
> Felix, > > With Spring MVC, instead of the SlingMainServlet dispatching requests based > on sling resourceType, abs path, it would be attaching controllers based on > mappings which could be paths or regex patterns and of course it'd tie into > the spring way of doing things like form data binding, validations, error > handling, etc. > > I'd be interested to see how there could be multiple dispatching servlets > in parallel in Felix with SlingMainServlet being one of them but I think > it's not so easy so most likely the answer is to have one call the other > based on some criteria. That's not a problem: You register the Serlvets with the OSGi Http Service giving a root path. Just understand that the Sling Main Servlet occupies "/". So you might want to get the "/spring" space or such. > > Of course, maybe if we turn this around the other way, it could be done > using a custom resource provider but would that have to listen on calls > under a certain path (e.g. /spring)? > > Somebody's tried to do this type of thing here although I don't think I've > fully understood it: > > http://www.jasonday.net/content/running-spring-mvc-sling Thanks for the link. Regards Felix > > > Sarwar > > > On Tue, Nov 13, 2012 at 11:12 PM, Felix Meschberger <[email protected]>wrote: > >> Hi, >> >> Am 13.11.2012 um 23:35 schrieb Martin Phee: >> >>> New to sling. >>> >>> I'm trying a spring MVC sample and it needs a number of dependencies >>> installed into sling. What the best way to add them all? Can I create a >>> custom build of sling with these in it already? >> >> Yes, sure. Just add the respective Spring Bundles (must be OSGi bundles, >> regular Spring JAR files don't work) to the bundle list in the Launchpad >> Builder module and build it. >> >> Just one caveat: I am not sure, whether and how Spring MVC really works. >> So we would be very interested to hear your experiences. >> >> In fact, I am not even sure, whether you gain much by using Spring MVC >> together with Sling. Both try to solve the same problem, essentially. But >> in my opinion Sling is more elegant. >> >> Regards >> Felix >> >> >>> We're starting a project >>> and looking to use sling with spring MVC for the custom RESTful services. >>> >>> >>> http://www.jasonday.net/content/running-spring-mvc-sling >> >>
