XPages: Run your own Servlets

A really interesting article about running your own servlets on domino server can be found here: http://www.ibm.com/developerworks/cn/lotus/xpage-servlet/index.html

It’s chinese, but you can translate f.e. with Google’s Translator.

With 8.5.3 I had have some problems because the required interface IServletFactory could not be resolved in DDE.

To get the example running, you have to add a JAR to your build path. Open Project properties, select „Java Build Path“ and click „Add External JARs„:

Now you have to add the file „lwpd.domino.adapter.jar„. This can be found in the following folder:


The <VERSION> string depends on your current installation and Server-Version.

After adding this JAR to the build path, the compilation problems should be resolved.

Dieser Beitrag wurde unter Extensibility API, Java, JSF, Server, Web, XPages abgelegt und mit , , , , , , verschlagwortet. Setze ein Lesezeichen auf den Permalink.

6 Antworten zu XPages: Run your own Servlets

  1. Toby Samples sagt:

    This is definetely the easiest way to do so, but they only run in context of the db if I remember correctly. You can build real HTTPServlets that run in server context if you deploy them using an osgi bundle. Let me know if you want the info on how to do that.

  2. Lee sagt:

    Hi, good tip.

    However I still couldn’t get the servlet to load. When I go to the URL advised in the article I just get a blank screen. Viewing the server log doesn’t throw any errors so I can’t even tell what’s going wrong.

    Could you post a sample NSF with the code which you know works in your case? At least that way if that doesn’t work on my server, it proves it’s an issue with the server and not the NSF.

    Thanks again for the tip.

    Kind regards,

  3. Arne Menting sagt:

    Hey, awesome idea, does this mean that if it is running in the database context that the servlet is diposed at some point and reinstantiated if needed? Especially when using JPA and developing alot, i often run out of memory, because classes and drivers are loaded via class loaders and the garbage collector does not remove old classes (while new code is deployed and tested).
    Thanks alot for sharing!

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.