• Custom Servlet with Rest services

    By Michael Bourak 1 decade ago

    Hi,

    I'm trying to use the REST services. As I need some custom stuff, I followed the sample and made a custom servlet, refecence it via META-INF etc..

    That's cool...as long as all my code is in the NSF (either in a custom source folder or as jar fies in web-inf/lib)

    For practical reason, I want to turn my custom rest servlet project into a separate eclipse project.

    - I let the META-INF/Services.. file in the NSF

    - I make an OSGI plugin from my code (I even try to turn that into an extension library)

    But as soon as my code is outside the NSF (OSGI plugin - I checked it was resolved by domino -  or as a jar in jvm/lib/ext), my rest services no longer works.

    In the domino log files, I see that services are trying to be loaded from within the NSF itself

     

    Question is : is it possible to have custom servlets code OUTSIDE of the NSF ?

     

    Thanks

    • No. I wouldn't expect that to work ...

      By Dave Delay 1 decade ago

      In the documentation (see Extension Library REST Services.pdf) we make the distinction between a custom database servlet and a custom Wink servlet.  I think you really want to build a custom Wink servlet.

       

      Unfortunately, we haven't documented exactly how to do that.  Section 5 is a place holder for describing Wink services.  We hope to complete that soon.  In the mean time, you should know the Domino data service is in fact a custom Wink servlet.  You could take a look at the code (com.ibm.domino.das) to see how it's implemented.

       

      -- Dave

      • hum,but why...

        By Michael Bourak 1 decade ago

        can't the services be loaded from a plugin or from a jar in jvm/lib/ext ?

        Is there a classloader issue ?

        does that mean that all servlets (not just DAS related ones) need to be in NSF and I cant have them in a separate stuff (plugin, jar etc..)