The Lotus Domino Toolkit for WebSphere Studio

     

The Lotus Domino Toolkit for WebSphere Studio (LDTWS) is an Eclipse plug-in that provides the WebSphere Studio developer with views and tools to integrate Domino database design elements such as forms, views, and agents into a J2EE application. Specifically, the LDTWS provides a set of JSP tags that use the Domino Java classes to access NTF databases on the same server as the JSP or via a separate Domino server system. The Domino JSP tags are packaged as two tag libraries that can be included in a Web project or individual JSP file within WSAD.

At the time of this writing, there are two versions of the LDTWS. LDTWS 1.0 is intended to be installed to WSAD 5.0, and LDTWS 1.1 is intended for WSAD 5.1. The discussion in this section applies to either version.

Using the LDTWS

How easy is it to use the LDTWS tag libraries? The straightforward way is to add the Domino tags to a JSP manually using the JSP editor to insert the explicit HTML source for the tag definition. For example, suppose we want to populate a text area in a JSP with the value of a field in a certain document in a Domino database. We could edit the JSP and enter the Domino tag <domino:item /> as the HTML source.

There's an even easier way. The LDTWS plug-in provides a special WSAD navigator view, "Domino," which can access and open any Domino database available on your local workstation or via a Domino server. Once a Domino database is made accessible in this view, we can select any Domino design element directly and drop it onto a JSP in the editor, and the Domino tag corresponding to the design element is created in the JSP source. OK, this is easier.

Before we look more closely at how to use it, let's consider the broader implications of the Domino navigator view. Not only does it make adding Domino tags to JSPs easy, it at the same time makes available all of your existing Domino designs (from databases or design templates) to be reused as JSP design elements. But you may be thinking...I can just enable my Domino databases for Web access. True enough. However in many cases, making a Domino server directly accessible on the Internet (as it would have to be to allow the Domino HTTP server task to serve the database pages) causes consternation among the security minded. By using JSPs, the JSP engine can be separated from the HTTP server across a firewall and the JSP engine from the Domino server. In addition, using JSPs allows the entire Web application to be presented from the same server rather than having some pages come from WAS and some from Domino. Finally, it enables Web application developers unfamiliar with Domino design tools to work with Domino design elements at an easy to grasp level.

Now let's look at how to use the Domino navigator. You can access it from the Web perspective within WSAD by selecting the Domino tab at the bottom of the navigator pane as indicated in Figure 8-1.

Figure 8-1. Domino tab.

graphics/08fig01.jpg


The Domino navigator view is then displayed and initially looks as shown in Figure 8-2. This view is blank the first time you open it.

Figure 8-2. Domino navigator view.

graphics/08fig02.gif


To open a Domino database in this view, either select the first icon on the title bar, or right-click in the view frame and select "New database connection..." The result is the dialog shown in Figure 8-3.

Figure 8-3. Domino Database Connection dialog.

graphics/08fig03.gif


There are two ways to specify the input fields in this dialog depending on where the Domino database you want to access resides. If the database is on your workstation, then leave the Domino Server and User fields blank and specify the file name of the database in the Path field. WSAD looks for the database under the default Notes path on your workstation ”if it's in another directory, you must specify the full path to the database (see Figure 8-3).

If the database is on a remote Domino server, then specify the TCP/IP host and domain name of the server in the Domino Server field and, optionally , the user name under which to access the database in the User field. For local databases, specify the file name of the database in the Path field.

Press the Finish button to establish the database connection. (If a user name was specified, the user is prompted for the password for that user name.) If the database connection can be established, the database path appears in the Domino view window as shown in Figure 8-4.

Figure 8-4. Domino view with database connection.

graphics/08fig04.gif


Now you can select any of the design elements shown by this view, including forms, individual fields, entire views, or columns within a view and server agents. In Chapter 9, "Accessing JE22 Elements from Domino," we discuss the Domino tag libraries and their usage in more detail.

Testing LDTWS Applications

Now that you've built a Web application that accesses Domino databases using the Domino tag libraries, how does one go about testing? Certainly, you can set up a server system for testing and install a version of WebSphere Application Server and Domino on this server. Then it is a matter of deploying your application to the WAS system (along with the Notes.jar library) and testing from this system. Depending on your organization's development environment, this may be relatively easy, or it may present difficulties.

If your development workstation is capacious (with a capital "C"), another possibility is to test solely on the workstation. WSAD V5 comes with a nearly full-fledged version of WAS V5 itself, which can be run from within the WSAD workbench. This WAS within WSAD is referred to as the WebSphere Test Environment (WTE). The WTE can be configured and started to run servlets, JSPs, EJBs, and even JMS components . With a bit of extra configuring, the WTE can easily run JSPs utilizing the Domino tag libraries. With just this "out of the box" setup, JSPs using the Domino tags can be tested against a remote Domino server system. Going a step further, it is possible to set up a Domino server on a workstation with WSAD to get a self-contained test system.

Here's how: Install the Domino 6 server to the workstation following the standard install and server setup procedure. (The type of server to install, Messaging, Utility or Enterprise, is not important for testing the Domino tags under WTE.) Once the server is installed, add the top level path to the server to the PATH environment variable. For example, the usual server path is /opt/lotus/domino on a Unix system or C:\Lotus\Domino on a Windows system. (If a Domino client is also installed on the workstation, it is important that the Domino server path precede the client path in the PATH string ”this order will have no effect on the client execution.) With this PATH string setting, the Domino Java classes (in Notes.jar), which are invoked by the Domino JavaScript tags, find the notes.ini file for the Domino server and then are able to access Domino databases on the workstation itself. This is precisely how the Domino tags within JSP classes can access Domino databases under the WTE. Notice that nothing was mentioned about starting the Domino server ”accessing Domino databases via the Notes.jar does not require a running Domino server.

There it is ”WSAD/WTE and Domino server installed on a single system such that JSPs utilizing the Domino tag libraries can be written and tested.



IBM WebSphere and Lotus Implementing Collaborative Solutions
IBM(R) WebSphere(R) and Lotus: Implementing Collaborative Solutions
ISBN: 0131443305
EAN: 2147483647
Year: 2003
Pages: 169

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net