C H A P T E R  10

Using Sun Java System Web Server Instances in the IDE

Once you have successfully installed the Java Studio Enterprise IDE and Sun Java System Web Server 6 2004Q1 Update 1, Service Pack 2 (Web Server - from Optional Servers), you can verify the configuration of Web Server. The Java Studio Enterprise IDE includes the Sun Java System Web Server plug-in. This chapter describes common procedures enabled by the plug-in and describes the scenarios for Web Server instance usage from the IDE.

Sun Java System Access Manager and Sun Java System Portal Server can be installed from the Optional Servers portion of Sun Java Studio Enterprise 7. These two products are essentially web applications that run in a web container. The web container can be either Application Server or Web Server. The default web container is Application Server. During installation of the Optional Servers, you can select Web Server to be the web container instead. The resulting web server instances are described in TABLE 10-1 and TABLE 10-2.

This chapter covers the following topics:


Using the Correct Web Server Instance (Microsoft Windows)

When you install the Java Studio Enterprise IDE and Web Server, the installer creates one or more preconfigured web server instances depending on choices that you make during installation. The following table, TABLE 10-1, describes the possible scenarios and the instances that are created.


TABLE 10-1 Web Server Instances Created During Installation (Microsoft Windows)

Scenario

Web Server Installed

Access Manager Installed

Portal Server Installed

Web Server Selected as Web Container

Instances Created

Owner of Instance

1

Yes

No

No

N/A

https-admserv

https-machinename.domainname

 

administrator

2

Yes

Yes

Yes

No

https-admserv

https-machinename.domainname

 

administrator

3

Yes

Yes

Yes

Yes

https-admserv

https-machinename.domainname =web container for Access Manager and Portal Server

administrator


If you installed Web Server using scenario 3, you might want to create and use a separate web server instance for development purposes to avoid issues such as accidentally undeploying either Access Manager or Portal Server. Use the procedure, To Create a Web Server Instance (Microsoft Windows).

To create a web server instance that is not owned by the administrator account used for installing, follow the procedure To Create a Web Server Instance (Microsoft Windows)

See Appendix C for technical details of the web server instance on a Microsoft Windows machine.


procedure icon  To Create a Web Server Instance (Microsoft Windows)

This procedures uses the Web Server Administrative Console to create a new web server instance.

1. Log in as administrator on the machine where you have Web Server installed.

2. From the command line, change to the installation directory for the Web Server Admin Server. For example, using the default directory:


cd \Sun\jstudio_04Q4\WebServer6_2004q1\https-admserv

3. Start the Web Server Admin Server process.


startsvr.bat

Once you see the message "server started successfully", proceed to the next step.

4. Access the Web Server Graphical Interface by typing the default server URL in your web browser.

This URL is of the format http://machinename.domainname:adminport. For example, http://host1.example.com:8888.

To locate the proper URL:

a. Open the java-studio-install-dir/Configuration_Data.html file in your web browser.

b. Find the entry labeled Web Server Admin URL and click the link.

5. When prompted, type the User Name and Password.

Use the values that you entered on the Configuration page during installation. If you do not remember what you used for the User Name, you can find it in the Summary_Report.timestamp for your installation session. Refer to the installation chapter for your platform for the location of this report.

The Web Server Administration Server Console appears in the browser window.

6. From the Servers tab, click Add Server.

The Add Server form displays in the browser.

7. Enter the requested values.


Name of Field

Example Value

Additional Information

Server Name

www.mozilla.com

(or machine-name.domain-name)

Specifies the fully qualified host name of this server.

Server Port

8059

Specifies an unused port number to service the HTTP requests for this server.

Server Identifier

marketing_server

Specifies the server identification (a name) for the Administration Server to use for this server instance. The Server Identifier cannot start with a digit. Only ASCII characters are supported.

Server User

IDE-user-account-login

Specifies the user name under which this server instance runs. This should match the user account that will run the IDE.

Document Root

/home/IDE-user-account-login

Specifies the directory path to the location of the server's web documents.


8. Click OK.

The new instance is created. You can now set this server instance as the default Web Server in the IDE. See To Set the Default Web Server Instance in the IDE


Using the Correct Web Server Instance (Solaris OS)

When you install the Java Studio Enterprise IDE and Web Server, the installer creates one or more preconfigured web server instances depending on choices that you make during installation. The following table, TABLE 10-1, describes the possible scenarios and the instances that are created.


TABLE 10-2 Web Server Instances Created During Installation (Solaris OS)

Scenario

Web Server Installed

Access Manager Installed

Portal Server Installed

Web Server Selected as Web Container

Instances Created

Owner of Instance

Non-root usage enabled during install

1

Yes

No

No

N/A

https-admserv

https-machinename.domainname

 

root

root

No

1a

Yes

No

No

N/A

https-admserv

https-machinename.domainname

 

 

https-jstudio

 

root

root

 

non-root user specified during install

 

Yes

2

Yes

Yes

Yes

No

https-admserv

https-machinename.domainname

 

root

root

No

2a

Yes

Yes

Yes

No

https-admserv

https-machinename.domainname

 

https-jstudio

 

root

root

 

non-root user specified during install

Yes

3

Yes

Yes

Yes

Yes

https-admserv

https-machinename.domainname

 

root

root

No

3a

Yes

Yes

Yes

Yes

https-admserv

https-machinename.domainname

 

 

https-jstudio

 

root

root

 

non-root user specified during install

Yes


During installation on a Solaris OS machine, you have the opportunity to enable Application Server and Web Server usage by a non-root user. If you did this, the installer created a second instance of Web Server belonging to the specified non-root user account. If you did not use this option during installation follow the procedure To Create a Web Server Instance (Solaris OS) to create a web server instance for a standard user.

See Appendix D for technical details of the web server instances on a Solaris OS machine.


procedure icon  To Create a Web Server Instance (Solaris OS)

The superuser performs this procedure to create an instance for another user, usually a non-root end user. This procedures uses the Web Server Administrative Console to create a new instance.

1. Become a superuser.

2. From the command line, change to the installation directory for the Web Server Admin Server.


# cd /opt/SUNWwbsvr/https-admserv

3. Start the Web Server Admin Server process.


# ./start

Once you see the message "server started successfully", proceed to the next step.

4. Access the Web Server Graphical Interface by typing the default server URL in your web browser.

This URL is of the format http://machinename.domainname:adminport. For example, http://host1.example.com:8888.

To locate the proper URL:

a. Open the java-studio-install-dir/Configuration_Data.html file in your web browser.

b. Find the entry labeled Web Server Admin URL and click the link.

5. When prompted, type the User Name and Password.

Use the values that you entered on the Configuration page during installation. You can find User Name in the Summary_Report.timestamp for your installation session. Refer to the installation chapter for your platform for the location of this report.

Web Server Administration Server Console appears in the browser window.

6. From the Servers tab, click Add Server.

The Add Server form displays in the browser.

7. Enter the requested values.


Name of Field

Example Value

Additional Information

Server Name

www.mozilla.com

(or machine-name.domain-name)

Specifies the fully qualified host name of this server.

Server Port

1025

(Solaris OS) Be sure to use an unused port number above 1024.

Specifies an unused port number to service the HTTP requests for this server.

Server Identifier

marketing-server

Specifies the server identification (a name) for the Administration Server to use for this server instance. The Server Identifier cannot start with a digit. Only ASCII characters are supported.

Server User

IDE-user-account-login

Specifies the user name under which this server instance runs. This should match the user account that will run the IDE.

Document Root

/home/IDE-user-account-login

Specifies the directory path to the location of the server's web documents.


8. Click OK to create the new instance.

9. Exit from superuser privileges.

10. Provide your standard end user with the Server Identifier.

The standard user can now set this server instance as the default web server instance in the IDE using the following procedure.


Other Common Web Server Tasks

These procedures can be used to set or confirm the default Web Server instance and to start the Web Server instance from the IDE. For information on validating the Web Server from outside the IDE, refer to Chapter 13 for Microsoft Windows systems and to Chapter 14 for Solaris OS systems.


procedure icon  To Set the Default Web Server Instance in the IDE



Note - This procedure is done by the Server User (the standard end user) specified when the new Web Server instance was created.



1. In the IDE Runtime window, expand the Server Registry node and expand the Installed Servers node.

2. Expand the Sun Java System Web Server 6.1 node.

You see your Web Server instance with the name that was specified as the Server Identifier. For example: https-marketing-server.

(Solaris only) If you created a non-root instance of Web Server during installation, your Server Registry looks something like this:

IDE Runtime window's Server Registry showing web server instances under Sun Java System Web Server 6.1 node.

3. Expand your Sun Java System Web Server instance node to see the virtual server.

4. Right-click the Virtual Server instance and choose Set As Default from the contextual menu.

5. Expand the Default Servers node to verify that the Web Tier Applications node shows the new server instance as the default.

Runtime window's Server Registry showing expanded Default Server node with new instance as the Web Tier Application default.


procedure icon  To Confirm the Default Web Server

1. In the IDE Runtime window, expand the Server Registry node and expand its Default Servers subnode.

If the Web Tier Applications node's label is server-instance(machinename:portnumber) and matches the Web Server instance that you want to use from the IDE, then your default Web Server is set correctly. If it is not, continue with the next step.

Runtime window Server Registry Default Servers node shows the default Web Tier Applications server is server1(localhost:8080).

2. Find your web server instance under the Installed Servers node, right-click the server instance, and choose Set As Default.

Your server is set as the default server for Web Tier applications.


procedure icon  To Start or Stop a Web Server Instance

1. Right-click the Sun Java System Web Server 6.1 node and choose Start Server [Stop Server] from the contextual menu.

2. Confirm that the server started successfully by returning to the Web Server Console.

You can find additional information about using the Web Server in Sun Java System Web Server documentation.