the servlets, refer to Appendix C,  Java code relating to Domino database  on
page 159.
Import packages
The following packages needs to be imported to construct our servlet:
import javax.servlet.*;
import javax.servlet.http.*;
import lotus.domino.*;
import java.util.Vector;
Besides the standard Java packages and the servlet packages, the
lotus.domino package is the Domino Object that we need to access the
Domino database. We also use java.util.Vector to provide support for dynamic
length array.
Access to Domino session and database
Session is the root in the containment hierarchy on the Domino object. We
can open a session to Domino server using several method depending on
how we will access the server.
We can have two option for accessing the server:
  Remote access
For accessing the Domino database remotely, we need to put the
hostname, userid, and password in the NotesFactory.createSession
method. For example, we try to open database myDB on server host1 with
userid myUser and password myPass:
Session s = NotesFactory.createSession( host1:8000 ,  myUser ,  myPass );
Database db = s.getDatabase( myDB );
Remember that the HTTP and DIIOP server must be running on the
server. In our case, we use anonymous access to DIIOP so that we can
just put the hostname in the NotesFactory.createSession method. For
more information on how to set up DIIOP user access, please refer to
Section,  Domino server Java and CORBA requirements  on page
  Local access
Local access is simpler, but the Domino server or client should be running
on the machine the Java program is executing. For this local access, the
Domino servlet manager must be enabled. The following example
accesses the myDB database locally:
Session s = NotesFactory.createSession();
Chapter 3. Building the Web server



About Services Network Support FAQ Order Contact

Linux Web Hosting

Our partners:Jsp Web Hosting Unlimited Web Hosting Cheapest Web Hosting  Java Web Hosting Web Templates Best Web Templates PHP Mysql Web Hosting Interland Web Hosting Cheap Web Hosting PHP Web Hosting Tomcat Web Hosting Quality Web Hosting Best Web Hosting  Mac Web Hosting  Business web hosting division of Vision Web Hosting Inc. All rights reserved