RunLogNSFAgentBean.java; package com.dokoll.solutions.inc.iphone; /** * Created: 2012.09.29.12.45.PM * Run SearchComStringInLog and SearchHttpStringInLog LotusScript Agents */ import javax.faces.context.FacesContext; import lotus.domino.NotesException; import lotus.domino.local.Database; /** * @author: Dököll Solutions, Inc. * @version 2012.09.29.12.45.PM */ public class RunLogNSFAgentBean { public void submitEntry() { //let's add a try catch here try { //get the current database being used Database database= (Database) FacesContext.getCurrentInstance() .getApplication().getVariableResolver() .resolveVariable(FacesContext.getCurrentInstance(), "database"); System.out.println("Database Obtained..." + database); //... //Run agent(s) database.getAgent("SearchHttpStringInLog").runOnServer(); database.getAgent("SearchComStringInLog").runOnServer(); }catch (NotesException e) { //print this error to the server e.printStackTrace(); } } } //Added information //Make sure your LotusScript Agent is set up to report only new documents from the back-end, to avoid load in the programming.