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.
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.
Yes please! This would be really interesting, I have planned to integrate PHP into XPages. Can you send me an email with these infos to firstname.lastname@example.org or post a link?
Thanks in advance!
Did you get the info for deploying via na OSGI bundle from Toby?
Could you forward me on the info?
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.
You can find a demo NSF here: http://hasselba.ch/share/XPagesServlet.zip
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!