Problem solve Get help with specific problems with your technologies, process and projects.

Using Java API to access folders/objects inside Domino server

How can I access inbox and other folders/objects inside my Domino server using Java APIs?

View member feedback to this Ask the Expert Q&A.

I'm not sure where your code is running, but the Java API is basically the same regardless. Once you are set up with a lotus.domino.Session object, you first have to locate the user's mail file.

      DbDirectory dir = 
     Database db = 

Then, use the Database..getView method to locate the inbox folder:

        View inbox = 

Inbox and a couple of other built-in folders have a special name. If you're not sure of the name of the folder you want to find, open the database in Domino Designer and look at how the folder naming scheme goes. To scan through all the folders, you can use Database..getViews to get all the views and iterate through them looking for folders.

However, this is somewhat inefficient since each view will have its index updated when you load its View object, which is work that didn't need doing. You can also find all the Folder design notes using a NoteCollection with a selection formula. There's a function at this URL which shows how to do this.


This is a good answer, but I'm not sure that was the question asked. I'm betting that the actual question here meant "folders" = "subdirectories".

—Doug J.

Do you have comments on this Ask the Expert question and response? Let us know.

Dig Deeper on Java for Lotus Notes Domino



  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...