C H A P T E R 8 |
Using Application and Web Servers With the Sun ONE Studio 4 IDE |
Once you have successfully installed the IDE and validated the IDE installation by creating a simple J2EE application (see for more information), you can use other application servers with the IDE.
This chapter contains information about using the BEA WebLogic Server 6.1 or BEA WebLogic Server 7.0 as the default application server for applications you develop with the Sun ONE Studio 4 IDE. The chapter also provides details on how to configure several application and web servers for use with web services.
Note - Download the WebLogic Server Plug-in module from the Update Center before you proceed with the rest of this chapter. See Updating Modules With the Update Center for information on how to download Sun ONE Studio 4 modules. In the Update Center wizard, expand the Enterprise Edition Modules node to locate the WebLogic Server Plug-in module. |
The WebLogic server must be running before you can deploy an application to it. However, before you start the application server, you must ensure that the WebLogic environment is set up correctly.
The BEA WebLogic server (versions 6.1 SP2 and 7.0) has been certified with this release of the Sun ONE Studio 4 IDE and is certified to run only with the Java 2 SDK, v. 1.3.1 software.
Follow these steps to make the WebLogic server the default application server for applications you create and deploy in the IDE.
See for instructions on how to start the IDE.
2. In the Explorer window, select the Runtime tab and expand the Server Registry/Installed Servers node.
The WebLogic Server 6.1 node and the WebLogic Server 7.0 node are visible. You can configure and use either or both of the WebLogic servers.
3. Right-click the appropriate WebLogic Server node and choose Properties.
The property sheet for the designated WebLogic server appears.
4. Set the value for the WebLogic Home property.
a. Select the WebLogic Home property.
b. For WebLogic Server 6.1, type weblogic-install-dir/wlserver6.1 and close the property sheet.
c. For WebLogic Server 7.0, type weblogic-install-dir/weblogic700 and close the property sheet.
5. Add a WebLogic server instance by right-clicking the appropriate WebLogic Server node and choosing Add Server Instance.
6. Set the password value in the property sheet.
a. Right-click the WebLogic server instance you just created and choose Properties.
The property sheet for the instance appears.
b. Select the Password property and type the password you specified during the WebLogic server installation as the property's value.
c. For WebLogic Server 7.0, set the RootDirectory property to the location of the server's config.xml file. For example, weblogic-install-dir/user_projects/mydomain
7. Right-click the WebLogic Server Instance 1 and choose Set As Default Application Server.
The WebLogic server is now the default application server used by the IDE.
To start the WebLogic 7.0 Server from the IDE, the following items must be provided from the Runtime tab of the Explorer:
This section presents information on how to configure WebLogic Server 6.1 and WebLogic Server 7.0 to work with web services.
Note - To use Sun ONE Studio 4 Web Services, applications servers must be configured with version 1.0_01 or higher of the JAX-RPC (Java API for XML-Based RPC) runtime environment. |
If you are using either WebLogic Server 6.1 or WebLogic Server 7.0 and you are starting the server from the IDE, you need to set the Startup Java Options property in the IDE.
1. In the Sun ONE Studio 4 IDE, click the Explorer's Runtime tab.
2. Expand the Server Registry node and its Installed Servers subnode.
3. Expand the WebLogic Server node to see the instance nodes
4. Select the instance you want to change, right-click the WebLogic Server Instance node and choose Properties.
The Properties window appears for this instance.
5. Locate the Startup Java Options property and enter the following string:
These instructions are necessary only if you want to start the server from outside the IDE using the WebLogic startup script.
If you are using the WebLogic Server 6.1 and plan to start the server from outside the IDE, append the following .jar files to the CLASSPATH environment variable in the WebLogic server startup script:
If you are using the WebLogic Server 7.0 and plan to start the server from outside the IDE, append the following .jar file to the CLASSPATH environment variable in the WebLogic server startup script:
$s1studioee_HOME/jwsdp/jwsdp-common-lib/jwsdp-common.jar
You do not need the servlet.jar file for WebLogic Server 7.0.
To start either the WebLogic Server 6.1 or WebLogic Server 7.0 from outside the IDE using the WebLogic startup script, do the following:
1. Open the WebLogic startup script in an editor of your choice.
2. Add the following string to the JAVA_OPTIONS variable:
This section describes how to configure the Tomcat web servers for use with web services.
The internal Tomcat v. 4.0.1 server cannot be used to deploy web-centric web service applications created with the Sun ONE Studio 4 update 1 IDE. The Sun ONE Studio 4 update 1 web services are created using JAX-RPC v. 1.0_01, which requires use of Tomcat v. 4.1.
The IDE bundles the Java Web Services Developer Pack (JWSDP) v1.0_01 software, which includes a Tomcat v. 4.1 server. Configuring this Tomcat v. 4.1 server as the default enables you to deploy Sun ONE Studio 4 update 1 web-centric web services properly.
To add the JWSDP Tomcat v 4.1 installation, do the following:
1. In the Sun ONE Studio 4 IDE, click the Explorer's Runtime tab.
2. Expand the Server Registry node and its Installed Servers subnode.
3. Right-click the Tomcat 4.0 node and choose Add Tomcat 4.0 Installation.
The Add Tomcat 4.0 Installation dialog box appears.
4. Use the browser to set the Home directory and the Base directory of the Tomcat server.
Set both directories to s1studio-install-dir/jwsdp
5. Specify IDE Integration Mode as Minimum.
Note - Specifying the IDE Integration Mode as Minimum disables JSP debugging and monitoring features. |
6. Click OK to close the Add Tomcat 4.0 Installation dialog box.
A new subnode appears in the Explorer Runtime window.
7. Expand the new JWSDP Tomcat subnode (under the Tomcat 4.0 node) and right-click the localhost:8080 subnode.
You might see an informational message "JSP compilation will be disabled." Click OK.
Web-centric services can now automatically use this new Tomcat v. 4.1 installation for deployment. Newly created web-centric services also have their SOAP URLs automatically set to localhost:8080 as the port address.
For web-centric web services created before you created this additional Tomcat installation, you need to reset the port address to 8080.
Note - When you run web applications that do not use web services, it is all right to switch back to the original default Tomcat 4.0 server. |
Web servers can host web-centric web service applications that use the Native Connector interface. These services provide integration with native (that is, C++ and C) language shared libraries. The web servers to which these applications are deployed might need to be configured to locate the required shared libraries.
To access native libraries from web-centric web services, perform the
1. Choose or create a directory where these native library files are to be deployed.
This directory must be on a filesystem that is accessible to the Tomcat 4.1 web server process. For example, <s1studio-install-dir/nativelib>
2. In the Sun ONE Studio 4 IDE, click the Explorer's Runtime tab
3. Expand the Server Registry node and its Installed Servers subnode and find the Tomcat 4.1 installation previously configured.
4. Right-click the Tomcat 4.1 installation. Choose Properties.
5. Edit the External Execution Process property by selecting it and clicking the ellipses in the right column of the property sheet.
6. Select the External Execution Process property and click the ellipses in the right column of the property sheet.
The property editor window opens.
7. In the Arguments edit box, insert the following prior to the "-classpath" argument (using the directory you chose in step 1):
-Djava.library.path=<s1studio-install-dir/nativelib>
Be sure to leave a space between this and the "-classpath" specification.
Copyright © 2002, Sun Microsystems, Inc. All rights reserved.