// TO DO: Attempt an inner try catch to grab ACL data, decide how to redirect user try { // get the current database Database database = (Database) FacesContext.getCurrentInstance() .getApplication().getVariableResolver().resolveVariable( FacesContext.getCurrentInstance(), "database"); // prepare to create a document Document submitDocument = (Document) database.createDocument(); // submit using UserInfoform (Alternatively, one can add the Alias of // that form) submitDocument.appendItemValue("form", "UserInfo"); // using appendItemValue to insert in the fields needed // notice we are referencing the field (userIP) on the Xpage // JavaBean variables //Additional Fields... //Additional Fields... submitDocument.appendItemValue("userIP", UserIP); // Run a JavaAgent after all items have been submitted from the Xpage database.getAgent("IntruderAlertJavaAgent").runOnServer(); // save the data submitDocument.save(); // recycle, release memory submitDocument.recycle(); // throwable initialized if there is an error } catch (NotesException e) { // print this error to the server e.printStackTrace(); } }