This requires the nsco.jar file (found in the data/domino/java directory
of the client).
and then :
package com.hpigmbh.fleetReporting.presentation.actions;
import java.io.IOException;
import javax.servlet.Servlet;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import lotus.domino.Database;
import lotus.domino.Document;
import lotus.domino.DocumentCollection;
import lotus.domino.NotesException;
import lotus.domino.NotesFactory;
import lotus.domino.NotesThread;
import lotus.domino.Session;
public class notesTest extends HttpServlet implements Servlet {
public void doGet(HttpServletRequest req, HttpServletResponse
resp) throws ServletException, IOException {
try {
NotesThread.sinitThread();
Session notesSession = NotesFactory.createSession(
"hostString", "userString", "passwordString");
Database notesDatabase = notesSession.getDatabase(
"MyServer", "MyDatabase.NSF");
DocumentCollection notesCollection =
notesDatabase.getAllDocuments();
Document notesDocument =
notesCollection.getFirstDocument();
// And so on
}
catch (NotesException e) {
e.printStackTrace();
}
finally {
NotesThread.stermThread();
}
}
public void doPost(HttpServletRequest req, HttpServletResponse
resp) throws ServletException, IOException {
}
}
if you're into notes development, the rest is easy as known from notes
script