Sunday, April 22, 2007

Extending Domino with Java - Part 1 IDE

When I answered the post on codestore I was sure that somewhere I had a working sample of domino and the HTTP client code that I did on a very short project. I searched on every dvd archive, thumbdrive and folders on my workstations to no avail.

So what next ?

Well, it didn't take long to write the code in the first place. The projects was only two days worth of consulting (over a year ago), so over the next week (or maybe two) in my spare time in the evenings we'll build it from scratch. To answer Rafaels question - yes I did get the authentication working with the proxy server. However, I don't have access to one for this exercise, so you might have to do some trial and error. I can point you in the right direction though.

It's not a bad idea to revisit the sample and using all of the latest code versions and libraries.

So where should I start ? I don't want to go over stuff that you may already know and I don't want to leave out important steps for the newbies to java and domino. For the experienced you can skip to the bits that interest you.

I think that maybe the first thing to do is start with the a decent Java IDE as Java in the Notes Designer leave a lot to be desired.

For this exercise I'll use Eclipse as its free and is the foundation for Rational Application Developer (RAD) so its familar when you are switching between them. Of course deciding on Eclipse is not that simple as there a few choices for eclipse.

First there is the standard IDE - around 90Mb - great for pure java programming but not many wizards or tools for anything else.

Next there is the Eclipse Web Tools Project (Eclipse WTP) - around 200 Mb - which provides tools for web and j2ee development.

Then there is the Eclipse Callisto Distribution from IBM - around 300 Mb - which bundles Web Tools Platform (WTP), Graphical Modeling Framework (GMF) and
Test and Performance Tools Platform (TPTP).

It's also worth mentioning MyEclipse they have an annual subscription service for a standard version for $30 USD or $50 USD for the professional version. For that you get all the updates plus support.

And the most feature rich of all the eclipse IDE variants is IBM's Rational Application Developer . It also has a price to match - 5,452.99 AUD.

There are other Java IDE's that are out there but I use the eclipse variants because sometime I have to use RAD as that's what the client uses and sometimes they don't have RAD and so the free versions are easier to install for some simple Java development. The bundles are good as they take some of the hard work out of ensuring that all the prerequisite components are installed too.

Lets use Eclipse WTP 1.5.3 and download the 'all-in-one' file from the download area. You'll also need to download a java sdk I would suggest picking one that matches the JVM version supplied with the version of Domino that you are using - that way the IDE will highlight any problems that you would otherwise encounter when you come to include the java code in Domino. So for Domino 6 - that's JSDK 1.3 and for Domino 7.0.2 that is JSDK 1.4.2. We'll use 1.4.2_13 from the Sun archive area.

Anyway that's enough for one night - next session we'll install Eclipse and the Java SDK, download the HTTP client jars and build the first test.


  1. Tony, I'm sorry to bring so many work for you. I must admit that I'm very excited with your blog/article, answering my question.

    Reading your blog entry, you answered that you've got authenticated with the proxy server.

    Well, I think I should ask you again, but with more information, just to make sure we're focusing the same achievement:

    1) I have a Domino (Suse Linux 7.02) server with a valid ip address, in my office;

    2) We host some apps/site in a hosting company. The apps/site runs on ASP/Sql server (not my choice!! ;-) );

    3) I managed, with lotusscript, to do scheduled queries to the SQL server, and collect some data;

    4) I need to connect to MRTG (, wich address is, i.e.: When I do this in my browser (Firefox!), I receive a dialog box asking for username and password. After a type both, I get access to bandwidth usage graphics. They're refresh every minute;

    5) I need to connect to ZABBIX (, wich is another software to monitor computer statics (cpu and memory usage, for instance).It's the same process, I go to, type my user and password, than I get the data I need.

    My goal is to write an schedule agent/code to:
    1) Go to those url's;
    2) Authenticate;
    3) Collect the data (the html source would be great!);
    4) Create a new Document and put the data a collected, to heave it in our own server, so I can do whatever I want... Send it to IT people, show it in a dashboard, etc...

    So here is the question... Again!

    When you say you've got authenticated do you mean with "your" own company's proxy server, or to a remote one?

    Even if it's a negative answer, I look forward to read your next blogs, since I think the way to achieve my goal is thru Java!

    Thanks a lot for your effort to help me, and I hope It will help a lot of others too!

  2. Rafeal,

    The client I did this for had thier own proxy server. That is, only select employees could view the internet by entering a username and password. In the HTTP Client there are different types of authentication for both proxy servers and for secure servers.

    I have a secure server that I'll use that for the authentication part of the exercise.

    The beauty of extending domino is that there is a lot of robust and established libraries out there that you can use.

    Thanks for reading, part 2 is in progress and comming soon.