Upload
frank-van-der-linden
View
1.133
Download
0
Embed Size (px)
Citation preview
Let’s serve your dataFrank van der Linden
About me• Freelance Java and front end developer• Owner of Elstar IT• Try to do some running and mountain biking
Roadmap• Theory• Prepare• Set up• Develop• Test• Deploy
Theory
What is a servlet• Java program to extends the capabilities of a server• Servlets provide a component-based, platform-independent
method for building Web-based applications• Servlets run in web containers, Servlet containers
Structure and architecture
Lifecycle
XAgent - a sort of servlet
Servlet in NSF• excellent series of Eric McCormick• https://edm00se.io/servlet-series/
Servlet as OSGi plugin• run server wide• Code can be shared with other processes like DOTS, XPages.• With small changes, it run also on other Java servers, like
Tomcat, WildFly(a.k.a. Boss) and Websphere
OSGi architecture
Prepare
Prepare• Download IDE e.g. Eclipse JEE• Set Target platform• Install PDE Debug plugin• Create com.ibm.notes.java.api project
*See Appendix A for steps to prepare your IDE
Develop
goals• Create a Shared code plugin• Create a web app plugin which runs on a Java server• Create a OSGi servlet which run on a Domino server
* See Appendix B for setup projects
my goals
Shared plugin
Domino - Servlet
Web app - Servlet
show some code
Logging• Build in via java.util.logging.Logger
• Log an error to the console….
Logging• ….log to a file, by adding a (File) handler
Test
Test
Test
Test
Test
• tell http quit• load http
Warning• After testing remove the pre.launch.ini from your workspace
directory of the Domino server
Deploy
Deploy• 2 ways of deployment to Domino
• as deployable jar• as an update site.
• Add to web server
As deployable jar• Export as deployable plugin…
• Put the jar in the correct directory on the server
• tell http quit —> load http
As update site• Create Feature project, add plugin projects• Create Update site project, add Feature project• Add update site to update site database• tell http quit —> load http
Deploy to web app
let’s deploy it
Thank you
https://bitbucket.org/flinden68/lets-serve-your-data
Appendix A
Target platform
Target platform
Target platform
PDE plugin
PDE plugin
PDE plugin
com.ibm.notes.java.api
Appendix B
OSGi Plugin set up
OSGi Plugin set up (servlet)
OSGi Plugin set up (servlet)
OSGi Plugin set up (servlet)
Web app set up