NonStop Servlets for JavaServer Pages (NSJSP) 6.0 System Administrator’s Guide Abstract NonStop Servlets for JavaServer Pages (NSJSP) is a container that runs Java servlets and JavaServer Pages (JSPs) that are platform-independent server-side programs, which programmatically extend the functionality of web-based applications by providing dynamic content from a web server to a client browser over the HTTP protocol. Product Version NonStop Servlets for JavaServer Pages 6.
Document History Part Number Product Version Published 525644-002 NonStop Servlets for JavaServer Pages 5.0 December 2005 525644-003 NonStop Servlets for JavaServer Pages 5.0 April 2006 544548-001 NonStop Servlets for JavaServer Pages 6.0 January 2008 544548-002 NonStop Servlets for JavaServer Pages 6.0 October 2009 544548-003 NonStop Servlets for JavaServer Pages 6.
Legal Notices Copyright 2011 Hewlett-Packard Development Company L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice.
NonStop Servlets for JavaServer Pages (NSJSP) 6.0 System Administrator’s Guide Glossary Index Examples Figures Tables Legal Notices What’s New in This Manual ix Manual Information ix New and Changed Information x About This Manual xiii Who Should Read This Guide xiii Organization of This Guide xiv Related Manuals xv Online Resources xviii Notation Conventions xix Abbreviations xxiv 1. Overview and Architecture Prerequisites 1-1 Introduction to NSJSP 6.
3. Configuring NSJSP Contents 3. Configuring NSJSP Configuring NSJSP 6.0 Container 3-1 servlet.config 3-2 nsjspadmin.config 3-8 server.xml 3-11 context.xml 3-13 web.xml 3-14 jdbc.config 3-14 filemaps.config 3-15 Deploying Web Applications 3-15 Deploying web applications using context.
5. Manager Web Application Contents Servlet Programming Features 4-2 Programming using NonStop Server for Java 4-3 Programming using other Java Environments 4-4 Servlet and NSJSP Examples and References 4-4 Using the Servlet API 4-4 Obtaining Specific CGI Environment Variable Values 4-6 Context Management 4-6 Multithreading – Spawning Java Threads 4-7 Request and Response Streams 4-7 Security Considerations 4-7 International Character Set Support 4-8 Reserved Cookie Names 4-8 javax.servlet.request.
6. Logging in NSJSP 6.0 Contents NSJSP Server Instance Detail 5-14 Complete NSJSP Status 5-16 Cleaning the NonStop SQL Session Data Managing Constraints 5-22 Shell Scripts 5-22 5-20 6. Logging in NSJSP 6.0 Prerequisites 6-1 Overview of Commons Logging and java.util.logging Commons Logging 6-1 java.util.logging 6-2 Logging Implementation in NSJSP 6.0 6-3 NonStop-specific Classes 6-4 LogFactory in NSJSP 6.0 6-6 6-1 7. Migrating to NSJSP 6.0 Configuration Considerations 7-1 server.xml 7-1 servlet.
C. NSJSP Container Objects Contents C. NSJSP Container Objects Server Object C-1 Service Object C-1 Connector Object C-2 Engine Object C-2 Host Object C-2 Context and Default Context Objects Loader Object C-3 Manager Object C-3 Resources C-3 Realm Object C-4 Valve Object C-5 C-3 Glossary Index Examples Example 3-1. Example 3-2. Example 3-3. Example 3-4. Example 3-5. Example 3-6. Example 3-7. Example 3-8. Example 3-9. Example 3-10. Example 3-11. Example 3-12. Example 3-13. Example 3-14. Example 3-15.
Figures Contents Example 4-1. Example 5-1. Example 5-2. Example 5-3. Example 5-4. Example 5-5. Example 5-6. Example 5-7. Example 5-8. Example 5-9. Example 5-10. Example 5-11. Example 5-12. Example 6-1. Example B-1.
Contents Table 2-2. Table 2-3. Table 3-1. Table 6-1. NSJSP Configuration Files in the iTPWS_INSTALL_DIR/conf Directory 2-7 NSJSP Configuration Files in the NSJSP_HOME/conf Directory Listeners of server.xml 3-12 LogLevels 6-4 2-8 NonStop Servlets for JavaServer Pages (NSJSP) 6.
Contents NonStop Servlets for JavaServer Pages (NSJSP) 6.
What’s New in This Manual Manual Information NonStop Servlets for JavaServer Pages (NSJSP) 6.0 System Administrator’s Guide Abstract NonStop Servlets for JavaServer Pages (NSJSP) is a container that runs Java servlets and JavaServer Pages (JSPs) that are platform-independent server-side programs, which programmatically extend the functionality of web-based applications by providing dynamic content from a web server to a client browser over the HTTP protocol.
What’s New in This Manual New and Changed Information New and Changed Information Changes to the 544548-004 manual Updated information about the reference guide in Server Directive section on page 3-2. Changes to the 544548-003 Manual Updated information about context.xml on page 3-14. Updated nsjsp_digestPassword on page 5-23. Changes to the 544548-002 Manual Updated information about the nsjsp_digestPassword in the Note on page 2-4.
What’s New in This Manual Changes to the 544548-001 Manual Updated the User Interface screenshots from the Admin Web application in Programming and Management Features on page 4-1. Updated the User Interface screenshots from the Manager Web application in Manager Web Application on page 5-1. Updated information on the following shell scripts: nsjsp_migrateSessionStore on page 5-22 nsjsp_digestPassword on page 5-23 Updated the new logging feature in Logging in NSJSP 6.0 on page 6-1.
What’s New in This Manual Changes to the 544548-001 Manual NonStop Servlets for JavaServer Pages (NSJSP) 6.
About This Manual This guide describes the installation, configuration, and management of the NonStop Servlets for JavaServer Pages (NSJSP) 6.0 component of the iTP Secure WebServer. Who Should Read This Guide The NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide is intended for experienced HP NonStop system administrators and operators who need to install, configure, and manage the iTP Secure WebServer on an HP NonStop system.
Organization of This Guide About This Manual Organization of This Guide Chapter Description Section 1, Overview and Architecture gives a general introduction to NSJSP 6.0 and discusses the architecture of NSJSP. Section 2, Installing NSJSP provides the procedures for installing NSJSP, including what to do before you begin, starting and restarting NSJSP, stopping NSJSP, and uninstalling NSJSP. This section also shows the post-installation NSJSP 6.0 directory structure.
Related Manuals About This Manual Chapter Description Appendix C, NSJSP Container Objects provides information about NSJSP container objects. Glossary contains definitions of NSJSP and iTP Secure WebServer terms. Index contains references and cross-references to all major topics in this guide. Related Manuals Related iTP manuals: iTP Secure WebServer System Administrator’s Guide describes how to install, configure, and manage the iTP Secure WebServer.
TCP/IP Manuals About This Manual The following manuals contain additional information about installing, configuring, and managing HP NonStop systems or other products you can use with NSJSP. TCP/IP Manuals For information specific to managing the TCP/IP subsystem, see: TCP/IP Configuration and Management Manual describes the installation, configuration, and management of the NonStop TCP/IP subsystem.
NonStop Transaction Services/MP (NonStop TS/MP) Manuals About This Manual NonStop Transaction Services/MP (NonStop TS/MP) Manuals For information specific to managing PATHMON environments, see: TS/MP System Management Manual describes the PATHCOM and TACL commands used to configure and manage PATHMON environments. This manual also includes manageability guidelines, information about monitoring and tuning a PATHMON environment to optimize performance, and methods for diagnosing and correcting problems.
Online Resources About This Manual These manuals contain additional information about NonStop systems: H06.nn Release Version Update Compendium provides a summary for the products that have major changes in the H-series, including the products’ new features, migration issues, and fallback considerations.
About This Manual Notation Conventions Notation Conventions Hypertext Links Blue underline is used to indicate a hypertext link within text. By clicking a passage of text with a blue underline, you are taken to the location described. For example: This requirement is described in Backup DAM Volumes and Physical Disk Drives on page 3-2. General Syntax Notation This list summarizes the notation conventions for syntax presentation in this manual. UPPERCASE LETTERS.
About This Manual General Syntax Notation { } Braces. A group of items enclosed in braces is a list from which you are required to choose one item. The items in the list can be arranged either vertically, with aligned braces on each side of the list, or horizontally, enclosed in a pair of braces and separated by vertical lines. For example: LISTOPENS PROCESS { $appl-mgr-name } { $process-name } ALLOWSU { ON | OFF } | Vertical Line.
Notation for Messages About This Manual a blank line. This spacing distinguishes items in a continuation line from items in a vertical list of selections. For example: ALTER [ / OUT file-spec / ] LINE [ , attribute-spec ]… !i and !o. In procedure calls, the !i notation follows an input parameter (one that passes data to the called procedure); the !o notation follows an output parameter (one that returns data to the calling program).
About This Manual Notation for Messages lowercase italic letters. Lowercase italic letters indicate variable items whose values are displayed or returned. For example: p-register process-name [ ] Brackets. Brackets enclose items that are sometimes, but not always, displayed. For example: Event number = number [ Subject = first-subject-value ] A group of items enclosed in brackets is a list of all possible items that can be displayed, of which one or none might actually be displayed.
About This Manual Notation for Management Programming Interfaces Notation for Management Programming Interfaces This list summarizes the notation conventions used in the boxed descriptions of programmatic commands, event messages, and error lists in this manual. UPPERCASE LETTERS. Uppercase letters indicate names from definition files. Type these names exactly as shown. For example: ZCOM-TKN-SUBJ-SERV lowercase letters.
About This Manual Abbreviations Abbreviations This list defines abbreviations and acronyms used in this guide. Both industry-standard terms and HP terms are included. AWT. Abstract Windowing Toolkit ARPA. Advanced Research Project Agency ATP. Active Transaction Pages BSD. Berkeley Software Distribution C. Country CA. Certificate Authority CBC. Cipher Block Chaining CCITT. Consultative Committee for International Telegraph and Telephone CGI. Common Gateway Interface CN. Common Name CWD.
About This Manual Abbreviations HTTPD. HyperText Transfer Protocol Daemon IEEE. Institute of Electrical and Electronics Engineers IEN. Internet Engineering Note IP. Internet Protocol J2EE. Java 2 Enterprise Edition JAR. Java Archive Tool JDBC. Java DataBase Connectivity JDK. Java Development Kit JIT. Just-In-Time (Java compiler) JNDI. Java Naming and Directory Interface JNI. Java Native Interface JSP. JavaServer Pages JVCP. Java Visual Class Package JVM. Java Virtual Machine KEK. Key Exchange Key L.
About This Manual O. Abbreviations Organization OLTP. Online Transaction Processing OSS. Open System Services OU. Organizational Unit PAID. Process Accessor ID PCT. Private Communication Technology PDF. Portable Document Format PEM. Privacy Enhanced Message PKS. Public Key Certificate Standard PPP. Point to Point Protocol QIO. Queued Input Output RFC. Request for Comments RLS. Resource Locator Service RSA. Rivest, Shamir, and Adelman SCF. Subsystem Control Facility SCT.
About This Manual HP Encourages Your Comments TACL. Tandem Advanced Command Language TAL. Transaction Application Language Tcl. Tool Command Language Tcl/CGI. Tool Command Language/Common Gateway Interface TCP/IP. Transmission Control Protocol/Internet Protocol TS/MP. Transaction Services/Massively Parallel URL. Uniform Resource Locator WAR. Web Archive WID. WebSafe2 Interface Driver WISP. WebSafe2 Internet Security Processor X.509. CCITT Recommendation for Security Service XML.
About This Manual HP Encourages Your Comments NonStop Servlets for JavaServer Pages (NSJSP) 6.
1 Overview and Architecture This chapter includes these sections: Prerequisites Introduction to NSJSP 6.0 NSJSP Architecture Prerequisites To understand the NSJSP 6.0 software and its architecture, you must have a good understanding of: Java 2 Enterprise Edition (J2EE) For information on J2EE, refer http://java.sun.com/javaee/index.jsp. JavaServer Pages (JSP) For information on JSP, refer http://java.sun.com/products/jsp. Introduction to NSJSP 6.
Overview and Architecture Implementation of NonStop-specific features in NSJSP 6.0 Implementation of NonStop-specific features in NSJSP 6.0 In NSJSP 6.0, changes to the Tomcat 6.0.13 code is kept at a bare minimum. This is done to facilitate easy migration to newer releases of Tomcat. To implement NonStopspecific features, suitable configuration plug-in points are identified. Wherever changes to Tomcat 6.0.
Overview and Architecture NSJSP Architecture NSJSP Architecture This section briefly introduces NSJSP environment and the benefits of running servlets in NonStop TS/MP ServerClasses. The NSJSP 6.0 implementation is a multi-thread, out-of-process servlet container, a Java web container that runs in a Java Virtual Machine (JVM) outside the iTP Secure WebServer HTTPD process. This architecture is shown in Figure 1-1.
NSJSP Architecture Overview and Architecture Figure 1-1. iTP Secure WebServer Servlet Architecture NonStop CPU 0 WEB CONTAINER WEB CONTAINER WEB CONTAINER NonStop CPU 1 NonStop CPU n WEB CONTAINER WEB CONTAINER WEB CONTAINER WEB CONTAINER WEB CONTAINER WEB CONTAINER JSP Pages JSP Pages JSP Pages Servlets Servlets Servlets iTP WebServer TCP/IP/PL iTP WebServer iTP WebServer TCP/IP/PL TCP/IP/PL FESA, E4SA or GESA SERVERNET I/O VST903.vsd Note. NSJSP 6.0 implements the Java Servlet 2.
2 Installing NSJSP This chapter includes these sections: Installing NSJSP Starting NSJSP Stopping NSJSP Restarting NSJSP Uninstalling NSJSP The NSJSP software is available on the NSJSP product CD. For installation instructions, see the readme.txt file. Installing NSJSP This section discusses the prerequisites and the procedure for installing the NSJSP software.
Installing NSJSP Installing NSJSP 6.0 from the Product CD Installing NSJSP 6.0 from the Product CD It is important that you read the release document to install the product successfully. To install NSJSP 6.0: 1. Open the product CD by double-clicking the CD drive. 2. Click View Readme. The readme.txt file opens in notepad. 3. Click IPSetup to launch IPSetup. The Welcome screen appears. 4. Click Next. The License Agreement screen appears. 5. Click Next. The Placement Options screen appears. 6.
Installing NSJSP Running the Setup Script The IPSetup saves the contents of T1222PAX in the version-specific OSS directory located at NSJSP_SETUP/version where: version is the VPROC string (T1222H60_20DEC2007_V600_1). After unpaxing the files in the OSS directory, proceed to the next section, Running the Setup Script. Running the Setup Script After the product files are extracted in the OSS file-system directory, run the setup script to complete a typical NSJSP 6.0 installation.
Installing NSJSP Running the Setup Script Both these command-line arguments perform the same operation. If you run the setup script with one of these command-line arguments, the setup script creates the file debug.log in the same directory as the setup script. Note. The file NSJSP_SETUP/version/debug.log contains information about all files that are copied as part of the release. The setup script validates the contents of the release using the file NSJSP_SETUP/version/contents.txt Note.
Running the Setup Script Installing NSJSP The script scans the servlet.config file for the installation version. After checking the version of an existing NSJSP installation, the script performs one of the following actions: Installing NSJSP for the first time The setup script performs a fresh installation if it does not detect any previous installation of NSJSP. Upgrading NSJSP The setup script detects any previous version of NSJSP running on the system.
NSJSP Directory Structure Installing NSJSP NSJSP_HOME/lib/libT1222.so and NSJSP_HOME/lib/libT1222log.so. The following is the output of the VPROC command for the libT1222.so file, /usr/tandem/webserver/servlet_jsp/lib: vproc libT1222.so VPROC - T9617H01 - (01 OCT 2004) SYSTEM \YOSBEA2 12:35:58 Date 11 DEC 2007, Copyright 2004 Hewlett-Packard Development Company, L.P. /usr/tandem/webserver/servlet_jsp/lib/libT1222.
NSJSP Configuration Files Installing NSJSP NSJSP Configuration Files Table 2-2 lists the NSJSP configuration files present in the directory iTPWS_INSTALL_DIR/conf. Table 2-2. NSJSP Configuration Files in the iTPWS_INSTALL_DIR/conf Directory File Description jdbc.config Contains JDBC-specific configuration information, including the location of the JDBC/MX and JDBC/MP installations. nsjspadmin.config Contains configuration information of the NSJSPADMIN ServerClass. servlet.
NSJSP Configuration Files Installing NSJSP Table 2-3 lists the NSJSP configuration files present in the directory NSJSP_Home/conf. Table 2-3. NSJSP Configuration Files in the NSJSP_HOME/conf Directory File Description catalina.properties Contains properties internally used by the catalina container, and information about the classes that are loaded during the NSJSP startup. Do not modify this file. context.xml Contains configuration information of default context loaded by all applications.
Starting NSJSP Installing NSJSP Starting NSJSP Before starting the NSJSP server, ensure that the servlet.config file is referenced in the httpd.config file. The NSJSP server starts with other components of the iTP Secure WebServer. You can start the iTP Secure WebServer using the start script located in the conf/directory. For more information on the start script, see iTP Secure WebServer Administrator’s Guide.
Installing NSJSP Stopping NSJSP Stopping NSJSP There are two ways to stop the NSJSP server: Graceful shutdown To stop the NSJSP server gracefully: 1. Obtain the PATHMON name from the httpd.config file located at iTPWS_INSTALL_DIR/conf 2. At the TACL prompt, run the following commands: TACL> PATHCOM = FREEZE server servlet = STOP server servlet The output of the = STATUS server servlet command displays the status of the NSJSP server. Note.
Installing NSJSP Uninstalling NSJSP Uninstalling NSJSP The uninstall script removes the currently installed version of the NSJSP software, files, directories, and web applications that are installed in your iTP WebServer environment. Caution. Back up your web applications before you run the uninstall script, because running uninstall removes all your web applications from the NSJSP_HOME/webapps directory. You must run this script using the same user ID that was earlier used to install NSJSP.
Installing NSJSP Uninstalling NSJSP NonStop Servlets for JavaServer Pages (NSJSP) 6.
3 Configuring NSJSP This chapter includes these sections: Configuring NSJSP 6.0 Container Deploying Web Applications Configuring the Security Manager Configuring Virtual Hosting Configuring Realms Configuring Single Sign-On Support Configuring Persistent Sessions Configuring NSJSP 6.0 Container Several configuration files support the NSJSP 6.0 container environment and web applications. These configuration files contain default values, and in most cases, you need not modify any of them.
servlet.config Configuring NSJSP the filemaps.config file contains the dynamically added Filemaps. The filemaps.config file is sourced from the file servlet.config. servlet.config The servlet.config file is used to configure the SERVLET ServerClass, and allows you to set the following NSJSP configuration parameters: Environment Variables Server Directive Note. The setup script automatically takes a backup of the previous servlet.
servlet.config Configuring NSJSP Arglist The Arglist parameter in the server directive specifies JVM command-line arguments. Example 3-1 shows a sample arglist for an NSJSP container class. Example 3-1. Arglist for an NSJSP Container Class Arglist -Xmx64m -Xss128k -Xnoclassgc \ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \ -Djava.util.logging.config.file=$env(NSJSP_HOME)/conf/logging.properties\ -Djavax.management.builder.initial=com.tandem.servlet.jmx.
Configuring NSJSP servlet.config -Xss maximum-stack-size maximum-stack-size In Example 3-1 the maximum-stack-size is being set to128 KB, which indicates the maximum stack size that can be used by a Java thread. -Xnoclassgc The -Xnoclassgc optional argument stops the Java class garbage collection. By default, the Java runtime reclaims space for unused Java classes. Including this optional argument may prevent any memory-leak problems. -Djava.util.logging.manager By default, this argument is set to org.
Configuring NSJSP servlet.config The double equal sign (==) is required to inform the JVM to use this file exclusively and to ignore other security policy files. -Djava.security.auth.login.config==[$env(JAAS_CONFIG_FILE)] Sets the JAAS login configuration file because NSJSP 6.0 runs without a default JAAS configuration. The JAAS module provided by NSJSP 6.0 can be used to authenticate users, based on the user accounts created in the safeguard subsystem on NonStop.
Configuring NSJSP servlet.config -DSaveSessionOnCreation=[ true | false ] Enables or disables saving sessions into a persistent store during creation time. The default value is false. This is to prevent saving the session before it is modified by the user application. This also reduces the database operation for every client request.
servlet.config Configuring NSJSP -Dcom.tandem.servlet.CONTEXT_PREFIXES This argument value is prefixed to the context path of all web applications. The default value is /servlet_jsp. You can set a context prefix for all applications. The value must begin with ‘/’ and must not contain any special characters. For example, if the value is set to /secure and the context of the application being deployed is /accountinfo, the entire context path in which the application is deployed is /secure/accountinfo.
Configuring NSJSP nsjspadmin.config nsjspadmin.config The nsjspadmin.config file is used to configure the NSJSPADMIN ServerClass. All the attributes in the servlet.config file are available and valid for the NSJSPADMIN ServerClass. Some of the NSJSPADMIN-specific parameters are discussed below. The NSJSPADMIN ServerClass is in the same TS/MP environment as the SERVLET ServerClass and uses the same configuration file server.xml as the SERVLET ServerClass.
Configuring NSJSP nsjspadmin.config TANDEM_SERVLET_SC_PATH TANDEM_SERVLET_SC_PATH specifies the path of the binary executable of the NSJSP SERVLET ServerClass. The default path is NSJSP_HOME/bin/servlet.ssc. Note. The value specified in TANDEM_SERVLET_SC_PATH must be an absolute path and not a relative path. TANDEM_FILEMAPS_CONFIG TANDEM_FILEMAPS_CONFIG specifies the path or location of the file filemaps.config.
nsjspadmin.config Configuring NSJSP Example 3-2. NSJSPADMIN Configuration Server $nsjspadmin_objectcode { CWD $env(NSJSP_HOME) Env CLASSPATH=$JVCP:$USRCP Env JAVA_HOME=$env(JAVA_HOME) Env JREHOME=$env(JAVA_HOME)/jre Env _RLD_LIB_PATH=$NSJSP_DLL_PATH Env TANDEM_HTTPD_SC_NAME=HTTPD Env TANDEM_SERVLET_SC_NAME=SERVLET Env TANDEM_SERVLET_SC_PATH=$server_objectcode Env TANDEM_FILEMAPS_CONFIG=$root/conf/filemaps.
Configuring NSJSP server.xml The above action directs all Uniform Resource Indicators (URI), starting with /servlet_jsp/admin and /servlet_jsp/manager, to the NSJSPADMIN ServerClass. server.xml The server.xml file is the configuration file that is read at server startup. It is used to configure various components of NSJSP server, such as server, service, connector, host, and other LifeCycleListeners. The default location of the server.xml file is NSJSP_HOME/conf. NSJSP 6.
server.xml Configuring NSJSP . Table 3-1. Listeners of server.xml Listener Description Jasper The classname for this listener is: org.apache.catalina.core.JasperListener For more information, refer http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html. ServerLifecycle The classname for this listener is: org.apache.catalina.mbeans.ServerLifecycleL istener Used internally in the NSJSP server for JMX operations. GlobalResourcesL ifecycle The classname for this listener is: org.apache.catalina.
Configuring NSJSP context.xml referring to the filemaps.config and the com.tandem.servlet.CONTEXT_PREFIXES. Example 3-3 displays a sample server.xml. Example 3-3. server.xml PAGE 62Configuring NSJSP web.xml the SessionBasedLoadBalancing command-line parameter, and considers the value to be true. The element must have the classname set to com.tandem.servlet.catalina.loader.NSJSPWebappLoader as follows: Note. If an individual application context does not have a manager element, the manager element present in the context.xml file will be the default value. For more information on context.
Configuring NSJSP filemaps.config filemaps.config The filemaps.config file includes the NSJSP-specific filemap directive. For more information on the filemap directive, see iTP Secure WebServer Administrator’s Guide. The entries in the filemaps.config file are referred by the SERVLET ServerClass and the NSJSPADMIN ServerClass during startup to determine the correct context path for the application. For example, consider a new application called orders and assume that com.tandem.servlet.
Configuring NSJSP Deploying web applications on NSJSP startup Deploying web applications on NSJSP startup If you do not want to use the NSJSP Manager, deploy your web applications statically to NSJSP followed by an NSJSP startup. The location where you deploy web applications for this type of deployment is called the appBase, and is specified for each Host. For more information on deploying web applications on the NSJSP startup, refer http://tomcat.apache.org/tomcat-6.0-doc/deployerhowto.
Configuring NSJSP Configuring the Security Manager Entries in the iTP_catalina.policy file use the standard format as java.policy file, as shown in Example 3-4: Example 3-4. Java Policy File entry // Example policy file entry grant [signedBy ,] [codeBase ] { permission [ [, ]]; }; The signedBy and codeBase entries are optional when granting permissions. Comment lines begin with // and end at the current line.
Configuring NSJSP Configuring the Security Manager Example 3-5. Policy File entry for the NSJSP Container // These permissions apply to the nsjsp-logging code grant codeBase "file:${catalina.home}/bin/nsjsp-logging.jar" { permission java.security.AllPermission; }; grant codeBase "file:${catalina.home}/bin/nsjsp_bootstrap.jar" { permission java.security.AllPermission; }; ...
Configuring NSJSP Starting NSJSP with Security Manager Example 3-5. Policy File entry for the NSJSP Container (continued) // These permissions are granted to the NSJSP balancer web // application. grant codeBase "file:${catalina.home}/webapps/balancer/WEBINF/lib/catalina-balancer.jar" { permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; }; // These permissions are granted by default to all web // applications.
Configuring NSJSP Troubleshooting the Security Manager Example 3-6. Starting NSJSP with a Security Manager # # NSJSP Java2 System policy file and Java2 VM option. # # Note: the "double" equalto signs "==" is not a typo!! This informs the JVM # to use this file exclusively and that all others are to be ignored. # set env(JVM_POLICY_FILE) $env(NSJSP_HOME)/conf/iTP_catalina.policy set NSJSP_SECMGR_POLICY -Djava.security.policy==$env(JVM_POLICY_FILE) ... set NSJSP_SECMGR -Djava.security.manager ...
Configuring NSJSP Enhanced Security Manager Example 3-7. Troubleshooting the NSJSP Security Manager Arglist -Xmx64m -Xss128k -Xnoclassgc \ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \ -Djava.util.logging.config.file=$env(NSJSP_HOME)/conf/logging.properties \ -Djavax.management.builder.initial=com.tandem.servlet.jmx.NSJSPMBeanServ erBuilder \ -Djava.security.debug=all \ $NSJSP_SECMGR \ $NSJSP_SECMGR_POLICY \ $NSJSP_JAAS_CONFIG \ -Dcatalina.home=$env(NSJSP_HOME) \ -Dcatalina.
Configuring NSJSP Configuring Virtual Hosting Configuring Virtual Hosting The Virtual Hosting feature enables you to access web services on multiple IP addresses or hostnames through a single iTP WebServer or NSJSP environment. Each virtual host can have its own servlet context or a set of servlet contexts. Servlet contexts cannot be shared across virtual hosts. In the server.xml file, the element represents a virtual host. One or more elements are nested inside an element.
Configuring NSJSP Configuring Realms MemoryRealm Accesses authentication information stored in an in-memory object collection, which is initialized from an XML document (for example, NSJSP_HOME/conf/nsjsp-users.xml). JDBCRealm Obtains authentication information stored in a relational database, accessed through a Java Database Connectivity (JDBC) driver.
Configuring NSJSP MemoryRealm MemoryRealm MemoryRealm is a simple demonstration of the NSJSP 6.0 realm interface. It is not designed for production use. During startup, MemoryRealm loads information about all the users and their corresponding roles from an XML document, which is loaded from the file NSJSP_HOME/conf/nsjsp-users.xml. Changes to data in this file are not recognized until the NSJSP server is restarted.
Configuring NSJSP MemoryRealm password The password you must use to log on. The password appears in clear text if the digest attribute is not set on the element or is encrypted appropriately as described in Digested Passwords on page 3-39). roles Comma-delimited list of the role names associated with the user. groups Aggregation of roles form a group. fullName The full name of the user. Note. groups and fullName are optional elements. The default contents of the file NSJSP_HOME/conf/nsjsp-users.
Configuring NSJSP JDBCRealm Your application is responsible for the administration of the information in the nsjspusers.xml file. The NSJSP container does not provide any built-in capabilities to maintain users and roles. For information on debugging and exception messages, see Logging in NSJSP 6.0 on page 6-1. JDBCRealm JDBCRealm is an implementation of the NSJSP Realm interface that recognizes users in a relational database accessed from a JDBC driver.
JDBCRealm Configuring NSJSP Example 3-11.
Configuring NSJSP JDBCRealm className The value is org.apache.catalina.realm.JDBCRealm. connectionURL The database URL used to establish a JDBC connection. For SQL/MX, specify the value jdbc:sqlmx: digest The digest algorithm used to store passwords in non-plain text formats. Valid values are those accepted for the algorithm name by the java.security.MessageDigest class. For more information, see Digested Passwords on page 3-39. If not specified, passwords are stored in clear text.
Configuring NSJSP JNDIRealm Example 3-12 shows that elements are included (commented out) in the default file NSJSP_HOME/conf/server.xml. Example 3-12. Using the SQL/MX database to specify JDBCRealm attributes PAGE 78Configuring NSJSP JNDIRealm There must be an attribute (identified by the userPassword attribute of our element) that contains the user's password, either in clear text or digested (see Digested Passwords on page 3-39). Each group of users that has been assigned a particular role is represented by an individual element in the top level DirContext, which is accessed through the connectionURL attribute.
Configuring NSJSP JNDIRealm connectionURL The directory server URL used to establish a JNDI connection. digest The digest algorithm used to store passwords in non-plain text formats. Valid values are those accepted for the algorithm name by the java.security.MessageDigest class. For more information, see Digested Passwords on page 3-39. If not specified, passwords are stored in clear text. roleBase The base element for role searches.
JNDIRealm Configuring NSJSP Example 3-13. LDBM database definitions ############################################################### # ldbm database definitions ############################################################### database suffix rootdn rootpw ldbm "dc=hp,dc=com" "cn=Manager,dc=hp,dc=com" secret Example 3-14 on page 3-33 shows the elements in the LDIF format that are populated in the directory server, which define the same users and roles as the default file NSJSP_HOME/conf/nsjsp-users.
Configuring NSJSP JNDIRealm Example 3-14.
JAASRealm Configuring NSJSP Example 3-15. Realm element for the OpenLDAP directory server
JAASRealm Configuring NSJSP * */ NonStopUserDB { com.tandem.servlet.jaas.NonStopLoginModule REQUIRED ; }; If you use the NonStopLoginModule, the user name may be specified in any of the following forms: Nonstop User Name: SUPER.
Configuring NSJSP JAASRealm : : 5. Configure the JAASRealm module in the server.xml file or in your Context configuration file located in the directory NSJSP_HOME/conf/NSJSP//. Example 3-16 shows an example of using the NSJSP provided NonStopLoginModule. . Example 3-16. Realm element in the iTP WebServer configuration file PAGE 85Configuring NSJSP DataSourceRealm For more information on configuring JAASRealm or creating your own login module, refer the Tomcat 6.0 Specification at http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html. DataSourceRealm DataSourceRealm is an implementation of the NSJSP Realm interface that uses a user database accessed using a JNDI named JDBC DataSource. Similar to the JDBCRealm, the DataSourceRealm requires a set of underlying SQL database tables to be available.
Configuring NSJSP UserDatabaseRealm roleNameCol Specifies the name of the column in the User RoleTable where the name of a role assigned to this user. userCredCol Specifies the name of the column in the Users Table where the user's password is kept. userNameCol Specifies the name of the column in the user Table where the user's name is kept. userRoleTable Specifies the location of the User Role Table. userTable Specifies the location of the Users Table.
Digested Passwords Configuring NSJSP digest The digest algorithm used to store passwords in non-plain text formats. Valid values are those accepted for the algorithm name by the java.security.MessageDigest class. For more information, see Digested Passwords on page 3-39. If not specified, passwords are stored in clear text. resourceName Specifies a defined resource for user database. In the Example 3-18, myOwnUserDatabase is defined as a global naming resource as: . . .
Configuring NSJSP Configuring Single Sign-On Support To calculate the digested value of a clear text password, two convenient techniques are used: If you are writing an application that needs to calculate digested passwords dynamically, call the static Digest() method of the org.apache.catalina.realm.RealmBase class, passing the clear text password and the digest algorithm name as arguments. This method returns the digested password.
Configuring NSJSP Configuring Single Sign-On Support 3. For each web application you operate under the single sign-on support environment, define the appropriate and elements in the web.xml of the web application. The elements identify portions of the application's URI space that are required for user authentication, and the element is used if this application is the first one accessed by the user that requires the user to log in.
Configuring NSJSP Configuring Persistent Sessions Configuring Persistent Sessions NSJSP 6.0 supports persistent sessions through the element in the context configuration file. Nest the element below a element, because the element represents a session manager that can be used to create and maintain session data for a particular web application.
Configuring NSJSP Configuring the Session Manager to support Persistent Sessions Use the following OSS command to forward the input file to the NonStop SQL Command Interpreter (SQLCI): osh> mxci < nsjsp_createSessionStore_mx.sql. Example 3-20. SQL/MP script to create a Persistent Store create catalog $data01.nsjspcat secure "OOOO"; --- Create the NonStop(tm) SQL Table in the above catalog for storing the -- NonStop(tm) Servlets for JavaServer Pages(tm) persistent session data. -create table $data01.
Configuring NSJSP Configuring NSJSPPersistentManager and Persistent Store The default implementation, NSJSPStandardManager, provides no persistence and stores sessions in memory only. The optional, NSJSPPersistentManager, stores active sessions that have been swapped out and also saves sessions across restarts of the NSJSP container. You can specify the storage location for the session data by configuring the appropriate element nested under the element.
Configuring NSJSP Configuring NSJSPPersistentManager and Persistent Store sessionProcessNameCol The name of the NonStop SQL database column in the specified sessionTable that includes the HP NonStop process name of the NonStop Server for Java (NSJ) process. This column type must accept as many characters as are included in the NonStop process name (typically 6).
Session Persistence to Store Configuring NSJSP Session Persistence to Store This section describes the situations in which the sessions are persisted to the persistent store. It is recommended to refer the SessionBasedLoadBalancing and the SaveSessionOnCreation description under NSJSP-specific Runtime Arguments on page 3-5 before attempting to understand session persistence to store. The SessionBasedLoadBalancing and the SaveSessionOnCreation are present in the servlet.
4 Programming and Management Features This chapter includes these sections: Client Programming Features Servlet Programming Features JMX Based Administration Admin Web Application Client Programming Features This subsection describes how to refer to a servlet and how to send requests to and receive responses from a servlet. For a web client, minor differences exist between using a servlet or any other type of CGI application.
Programming and Management Features Receiving Response Information from a Servlet Receiving Response Information from a Servlet The NSJSP container response information is displayed in the same format as the output of any other CGI program. The response information consists of: One or more HTTP response headers A blank line The response content If servlet/JSP does not provide the header information, the servlet API methods insert the header content-type: text/html.
Programming and Management Features Programming using NonStop Server for Java You can create a new servlet or modify an existing servlet by using the NonStop Server for Java or by using some other standard Java environment. For information on programming using the NonStop Server for Java, see the NonStop Server for Java (NSJ) Programmer’s Reference.
Programming and Management Features Programming using other Java Environments Programming using other Java Environments You can develop servlets in other Java environments and use them on the NonStop system, for example: The Abstract Windowing Toolkit (AWT) is included in the NonStop Server for Java 5 but classes that produce graphical output, return an exception.
Programming and Management Features Using the Servlet API the init(ServletConfig) method to perform any necessary initialization the ServletRequest and ServletResponse services the HttpServletRequest and HttpServletResponse service method to process requests as the application requires the destroy() method to deallocate resources gracefully. Your servlet must also use the doGet() and doPost() methods where applicable.
Programming and Management Features Obtaining Specific CGI Environment Variable Values Obtaining Specific CGI Environment Variable Values To obtain the value of a specific CGI environment variable, use the getHeaderNames() or getAttribute() methods with the string parameter value "com.tandem.servlet.parameter-name" where: parameter-name is the name of the desired environment variable.
Programming and Management Features Multithreading – Spawning Java Threads Multithreading – Spawning Java Threads NSJSP 6.0 supports spawning Java threads from a servlet or JSP. When multiple users access a servlet simultaneously, the web container does not instantiate a new servlet instance for each user. When a client accesses the servlet, the service() method is invoked in a separate thread. Therefore, each client is sharing the data of the servlet.
Programming and Management Features International Character Set Support International Character Set Support The iTP Secure WebServer supports international character sets (Unicode) for input to and output from the servlet environment. No specific configuration procedures are required to use international character sets with servlets/JSP. Reserved Cookie Names The cookie names JSESSIONID, JSESSIONIDSSO, NSJSPADMINSSO, and iTPWebSessionId are reserved for internal use.
Programming and Management Features JMX Based Administration Realm Object Valve Object For more information on objects, see Appendix C, NSJSP Container Objects. For more information on JMX MBeans, see the Apache Tomcat 6 Servlet/JSP Container documentation at http://tomcat.apache.org/tomcat-6.0-doc. NonStop Servlets for JavaServer Pages (NSJSP) 6.
Programming and Management Features Admin Web Application Admin Web Application The Admin Web application provides a graphical user interface (GUI) to administer container objects and resource modifications using JMX MBeans. In addition, an MBean invocation can also be performed using the Manager Web application by specifying the target object (or resource name), the invoking method, and the associated argument list in the query string of the URI.
Overview and Architecture Programming and Management Features Overview and Architecture The NSJSP Admin operations do not behave the same way as the Apache Tomcat implementation, which is a standalone application. When an Admin operation is run in Tomcat (after clicking Save), the change takes effect immediately. An NSJSP 6.0 container is a TS/MP ServerClass consisting of multiple server processes.
Login and Security Considerations Programming and Management Features Figure 4-2. Operator Commit Changes Command Select “Commit Change” button nsjspdmin httpd server broadcast update servlet Read by new dynami c servers server.xml Login and Security Considerations The Admin Web application uses the FORM method for its login control and uses the Admin role for its access control (by default). You must configure the Admin Web application in a private virtual host to avoid any security concerns.
Programming and Management Features Login and Security Considerations Figure 4-3. Admin Login page After completing the authentication and authorization processes, the Admin page displays the NSJSP 6.0 server container objects in an expandable directory-tree structure as shown in Figure 4-4. Figure 4-4. Admin Initial page NonStop Servlets for JavaServer Pages (NSJSP) 6.
Programming and Management Features Login and Security Considerations Every tree node represents an object node. The open and (+) sign indicate an expandable object node. Selecting the (+) sign allows you to fold or unfold a specific object node. The (-) sign indicates a non-expandable object node. To show and modify a specific node, you must select the label of an object node. The object tree is on the left-hand side of the frame. The frame on the right is to view a selected object.
Programming and Management Features Administering Server Objects Administering Server Objects Figure 4-5 displays the views of a Server object. The Server Actions drop-down menu lists the actions you can select, for example: Create New Service Delete Existing Services Figure 4-5. Server Object View/Modify page The Server object properties are described in detail in Server Object on page C-1. NonStop Servlets for JavaServer Pages (NSJSP) 6.
Programming and Management Features Administering Service and Engine Objects Administering Service and Engine Objects Figure 4-6 displays the views of a Service object. The Service Actions drop-down menu lists the available actions for a Service object, for example: Create New Connector Delete Existing Connectors Create New Host Delete Existing Hosts Create New Valve Delete Existing Valves Figure 4-6.
Programming and Management Features Administering Connector Objects The Engine object is nested in the Service object because they share a one-to-one relationship. The Service object properties are described in detail in Service Object on page C-1 Administering Connector Objects Figure 4-7 displays the views of a Connector object. The Connector Actions dropdown menu lists one available action: Delete This Connector Figure 4-7.
Programming and Management Features Administering Host Objects Administering Host Objects Displays the views of a Host object. The Host Actions drop-down menu lists the available actions, for example: Create New Aliases Delete Aliases Create New Context Delete Existing Contexts Create New Valve Delete Existing Valves Delete This host An Alias is the alias of a Host object. A Host object can have multiple Aliases. For more information on Host object properties, see Host Object on page C-2.
Programming and Management Features Administering Default Context Objects Figure 4-8. Context Object View/Modify page The supported session managers are: NSJSPStandardManager and the NSJSPPersistentManager. For more information on the NSJSPStandardManager properties and the NSJSPPersistentManager properties, see Manager Object on page C-3. Administering Default Context Objects Displays the views of a DefaultContext object. There is no available actions in the DefaultContext Actions drop-down menu.
Programming and Management Features Administering Realm Objects The Admin Web application does not allow a DefaultContext object to be created online because this affects all the running Contexts at the Engine or Host levels. Administering Realm Objects Figure 4-9 displays a view of a MemoryRealm object. NSJSP 6.0 supports several types of Realms. Different types of Realm may have their own type specific properties.
Programming and Management Features Administering Valve Objects Administering Valve Objects This section displays views of Value objects. NSJSP 6.0 supports several types of Valves: RemoteHostValve, AccessLogValve, RemoteAddrValve, RequestDumperValve, and SingleSignOnValve using the Admin Web application. For more information on the attributes, see Valve Object on page C-5. NonStop Servlets for JavaServer Pages (NSJSP) 6.
Programming and Management Features Administering Resources Administering Resources Figure 4-10 displays views of Data Sources. The Data Source Actions drop-down menu lists the available actions, for example: Create New Data Source Delete Data Sources Figure 4-10. Data Source View/Modify page NonStop Servlets for JavaServer Pages (NSJSP) 6.
Programming and Management Features Administering Resources Mail Sessions Displays views of Mail Sessions. The Mail Session Actions drop-down menu lists the available actions, for example: Create New Mail Session Delete Mail Session Environment Entries Displays views of Environment Entries. The Environment Entry Actions drop-down menu lists all available actions, for example: Create New Env Entry Delete Environment Entries User Databases Displays views of User Databases.
Programming and Management Features Administering User Definition Administering User Definition This section displays views of the Users List, Groups List, and Roles List. Users List Figure 4-11 displays a view of the Users List. The User Actions drop-down menu lists the available actions, for example: Create New User Delete Existing Users List Existing Users Figure 4-11. Users List page NonStop Servlets for JavaServer Pages (NSJSP) 6.
Programming and Management Features nsjspadmin.config ServerClass Configuration File Groups List Displays views of the Groups List. The Groups List Actions drop-down menu lists the available actions, for example: Create New Group Delete Existing Groups List Existing Groups Roles List Displays views of the Roles List. The Role Actions drop-down menu lists available actions, for example: Create New Role Delete Existing Roles List Existing Roles nsjspadmin.
Programming and Management Features server.xml Configuration File server.xml Configuration File The Commit Change operation causes the NSJSPADMIN server to serialize the current configuration back to the NSJSP server.xml configuration file. At the same time, the current version of the server.xml file is preserved using this naming convention: server.xml.yyyy-mm-dd.hh-mm-ss where: yyyy-mm-dd is the year-month-date hh-mm-ss is the hour-minutes-seconds (in 24-hour format) yyyy-mm-dd.
Programming and Management Features server.xml Configuration File As a result, the server.xml file may not be readable. You need to be careful when using a text editor to make subsequent changes. NonStop Servlets for JavaServer Pages (NSJSP) 6.
Programming and Management Features server.xml Configuration File Roll Back a Commit Change Operation You can manually roll back the Commit Change operation because the server.xml files are preserved: 1. Shut down the iTP Secure WebServer environment. 2. Rename the current server.xml to server.xml.temp. 3. Rename the preserved server.xml.yyyy-mm-dd.hh-mm-ss file to server.xml. 4. Depending on the nature of the Commit Change operation, rename the appropriate context configuration files .
5 Manager Web Application This chapter includes these sections: Accessing the Manager Web Application Security Constraints The Manager Web Application User Interface NSJSP Status Command NSJSP Container Status NSJSP Server Instance Detail Complete NSJSP Status Cleaning the NonStop SQL Session Data Managing Constraints Shell Scripts The Manager Web application provides the management functions for all web applications in the NSJSP container. The Manager Web application in NSJSP 6.
Accessing the Manager Web Application Manager Web Application Figure 5-1 shows the NSJSPADMIN ServerClass that receives a Manager request and broadcasts the corresponding command to all server processes in the SERVLET ServerClass after processing the request. Figure 5-1. Manager Web Application Architecture Web Appl manager cmds httpd httpd httpd Broadcast cmds nsjspad min Servlet servlet servlet Accessing the Manager Web Application In NSJSP 6.
Manager Web Application Security Constraints Figure 5-2. Manager Web Application Login Dialog The Manager Web application lists all the configured web applications in the NSJSP container (including both static configured and dynamically deployed web applications) after you have logged in. NonStop Servlets for JavaServer Pages (NSJSP) 6.
Manager Web Application The Manager Web Application User Interface The Manager Web Application User Interface Figure 5-3 displays the following sections on the Manager Web application GUI: Message Box Manager Area Applications Area Deploy Area NSJSP Server Information Area Note. The NSJSP Server Information area is the same as the Server Information area in the Manager Web application GUI. Figure 5-3. Manager Web Application User Interface NonStop Servlets for JavaServer Pages (NSJSP) 6.
Manager Web Application The Manager Web Application User Interface Message Box The Message box lists the result of the last command run on the NSJSP server. Example 5-1 displays the result of stopping the application docs at /servlet_jsp/docs context path and the servlet instance process name $Z9RX: Example 5-1. Message Box Manager Area Figure 5-4 shows the Manager area that contains the following links: List Applications Displays the configured web applications in the NSJSP container.
Manager Web Application The Manager Web Application User Interface Applications Area The Applications area in the Manager Web application GUI contains a list of the configured web applications with the following details: path of the application display name running status number of active sessions operational commands for applications Figure 5-5 displays the /admin web application, which uses the path /servlet_jsp/admin. The Display Name column is NSJSP Administration Application.
Manager Web Application The Manager Web Application User Interface The Sessions column displays the default session timeout for a web application and the number of currently active sessions. The Commands column provides the Start, Stop, Reload, and Undeploy commands. Start Command You can restart the application that has stopped by clicking Start in the Commands column.
Manager Web Application The Manager Web Application User Interface Reload Command The Reload command performs the shutdown operation and reloads the existing application. This can be useful when the web application context is not reloadable and you have updated classes or property files in the /WEB-INF/classes directory or when you have added or updated jar files in the /WEB-INF/lib directory.
Manager Web Application The Manager Web Application User Interface Deploy Area Web applications can be deployed using files or directories located on the server, or you can upload a web application archive (WAR) file to the server. Figure 5-6 displays the Deploy area. Figure 5-6. Deploy Area To deploy an application under /servlet_jsp: 1. Specify the path in the Context Path field. 2. Select the Automatically prefix the Context Path check box. 3. Click Deploy.
Manager Web Application The Manager Web Application User Interface The WAR or Directory URL field specifies a URL for the application's directory or a WAR file on the HP NonStop server. For example, if the application is located in the directory /usr/appls/newAppl, you must specify /usr/appls/newAppl in the WAR or Directory file URL field.
Manager Web Application NSJSP Status Command NSJSP Server Information Area Figure 5-7 shows the NSJSP Server Information area that includes: NSJSP Version: For NSJSP, it is “NonStop™ Servlets For JavaServer Pages™ v6.0” JVM Version: For example, 1.5.0_02-b09 JVM Vendor: Hewlett-Packard Company OS Name: NONSTOP_KERNEL OS Version: For example, H06.06 OS Architecture: For example, IA64N Figure 5-7.
Manager Web Application NSJSP Container Status NSJSP Container Status Figure 5-8 shows the GUI for NSJSP Container Status that includes: Manager Area NSJSP Server Information Area Server Processes Area JVM Area Connectors Area Figure 5-8. NSJSP Status Summary Page NonStop Servlets for JavaServer Pages (NSJSP) 6.
Manager Web Application NSJSP Container Status Server Processes Area The Server Processes in the Manager Web application GUI lists an entry for every running server instance. You can click the Server Processes link to access the next level of detailed information for the server process. Example 5-2 shows the Server Processes area. Example 5-2. NSJSP Status Summary Server Processes Area JVM Area Java Virtual Machine (JVM) aggregates the JVM statistics counters of all NSJSP server processes.
Manager Web Application NSJSP Server Instance Detail Connectors Area Connectors aggregate the statistics counters of all the connectors for all NSJSP server processes. Example 5-5 shows an example of the Connectors area. Example 5-5. NSJSP Status Summary Connector Area You can click the Connectors link to obtain the connector summary detail, which lists the connector summary of every NSJSP running server.
Manager Web Application NSJSP Server Instance Detail Example 5-6. NSJSP Status ($Y012) Page NonStop Servlets for JavaServer Pages (NSJSP) 6.
Manager Web Application Complete NSJSP Status Connector Summary The connector summary lists the connector statistics information in addition to the status of the running threads. Example 5-7 shows an example of the connector summary detail. Example 5-7. NSJSP Status (Connector) Statistics Detail Area Complete NSJSP Status The Complete NSJSP Status displays the aggregation of all the status and statistics counters for all NSJSP server processes.
Manager Web Application Complete NSJSP Status Example 5-8. Complete NSJSP Status Page NonStop Servlets for JavaServer Pages (NSJSP) 6.
Manager Web Application Complete NSJSP Status Application List The Application List area lists the configured web applications, with hyperlinks to their detailed statistics. Example 5-9 shows the Application List area. Example 5-9. Complete NSJSP Status Application List Area Example 5-10 shows the detail display of the NSJSP Status localhost/servlet_jsp/admin, localhost/servlet_jsp, and the localhost/servlet_jsp/manager areas. NonStop Servlets for JavaServer Pages (NSJSP) 6.
Manager Web Application Complete NSJSP Status Example 5-10. Application List Statistics Summary NonStop Servlets for JavaServer Pages (NSJSP) 6.
Cleaning the NonStop SQL Session Data Manager Web Application Cleaning the NonStop SQL Session Data Sessions saved by the NonStopSQLJDBCStore to a NonStop SQL database may never get cleaned up and will remain as orphan sessions when: the sessions are saved on an NSJSP container restart and are never accessed after the restart, or the sessions are backed up, or swapped out to the NonStop SQL database and are never accessed again after the NSJSP container fails and restarts.
Manager Web Application Cleaning the NonStop SQL Session Data Example 5-12. Using the nsjsp_cleanSessionData Script osh> /usr/tandem/webserver/servlet_jsp/conf: nsjsp_cleanSessionData 0 NonStop(tm) Servlets for JavaServer Pages(tm) Persistent Sessions Cleanup Script T1222 v6.0 _________________________________________________________________ Cleans up the persistent session data stored in a NonStop(tm) SQL database for NonStop(tm) Servlets for JavaServer Pages(tm).
Manager Web Application Managing Constraints Managing Constraints The Manager Web application has the following constraints: The Manager Web application only manages the web applications only in a virtual host. Therefore, you must configure a Manager Web application for every virtual host. The Manager Web application manages only the running NSJSP container. Any commands or changes that are modified using the Manager Web application affects only the running server processes.
Shell Scripts Manager Web Application To run this script, you enter the script name from the OSS prompt. The script guides you through the migration. An example of running this script follows: /usr/tandem/webserver/servlet_jsp/conf: nsjsp_migrateSessionStore NonStop(tm) Servlets for JavaServer Pages(tm) Persistent Sessions Migration Script T1222 v6.
Manager Web Application Shell Scripts NonStop Servlets for JavaServer Pages (NSJSP) 6.
6 Logging in NSJSP 6.0 This chapter includes these sections: Prerequisites Overview of Commons Logging and java.util.logging Logging Implementation in NSJSP 6.0 Prerequisites To understand the logging functionality in NSJSP 6.0, you must have a good understanding of: Commons Logging java.util.logging package NSJSP Overview of Commons Logging and java.util.logging This section provides an overview of the Commons Logging and the java.util.logging.
Logging in NSJSP 6.0 java.util.logging java.util.logging java.util.logging is a logging implementation provided by Java that is part of J2SE. The main components of java.util.logging are: LogManager Logger Objects Handler Objects LogManager The LogManager exists as a singleton and can be obtained using the static LogManager.getLogManager method. The LogManager tracks the global logging information, which includes a hierarchical namespace of the main loggers.
Logging in NSJSP 6.0 Logging Implementation in NSJSP 6.0 Logging Implementation in NSJSP 6.0 The logging package in NSJSP 6.0 is org.apache.juli. To overcome some of the limitations of java.util.logging, NSJSP 6.0 replaces the default java.util.logging implementation with a container-friendly implementation called juli. Note. In this chapter, the logging implementation in NSJSP 6.0 will hereafter be referred to as juli. NSJSP 6.0 provides a LogManager org.apache.juli.
NonStop-specific Classes Logging in NSJSP 6.0 ${catalina.base}/logs, during run time the ClassLoaderLogManager replaces the string ${catalina.base} with the output of the call java.lang.System.getProperty("catalina.base"). The logging levels mentioned in the logging.properties file are defined in the java.util.logging.Level class. Table 6-1 lists the different logging levels in the order of decreasing severity. Table 6-1. LogLevels Level Description SEVERE Indicates a serious failure.
NonStop-specific Classes Logging in NSJSP 6.0 However, the ArgumentIndex of java.text.MessageFormat is replaced by predefined literals. The literals that could be used are listed in the table below. Literal Description MESSAGE Prints the text message to be published. The data type is string. LEVEL Prints the message severity as indicated by the application. The data type is string. PROCESSNAME Prints the name of the JVM process. The data type is string. PIN Prints the PIN of the JVM process.
Logging in NSJSP 6.0 LogFactory in NSJSP 6.0 instance of the NSJSPFormatter, it passes the value of the format attribute to the NSJSPFormatter. This way the format in which messages are published can be configured. NSJSPFormatter formats a message in the default format when it is used with any other handler. The NSJSPFormatter class is com.tandem.servlet.logging.NSJSPFormatter, which extends the java.util.logging.Formatter class. By default, NSJSPLogHandler uses the com.tandem.servlet.logging.
LogFactory in NSJSP 6.0 Logging in NSJSP 6.0 The table below indicates the mappings between logging methods in the Log interface and the logging levels mentioned in the logging properties file. java.util.logging.Level Commons Logging Log Method FINER trace FINE debug INFO info WARNING warn SEVERE error, fatal The following example describes how methods in the Log interface are mapped to the logging levels in the logging.properties file. Assume the following: A handler 1nsjsp.com.tandem.
Logging in NSJSP 6.0 LogFactory in NSJSP 6.0 Log Rollover Feature in NSJSP 6.0 The log rollover feature provides a convenient way to manage the NSJSP log files. The benefits of the log rollover feature are: Manages and archives the log files depending on the file size or timestamp. Saves the rollover log files in a separate location, which is useful in archiving the log files. Note. The log rollover feature is introduced in the T1222^AAL SPR.
Logging in NSJSP 6.0 LogFactory in NSJSP 6.0 of the maxFileSize attribute is greater than 0 and less than 10, the rollover of a log file occurs only when the file size is 10 MB. For example, if the value of the maxFileSize attribute is set to 8 in the logging.properties file and the destination value is set to nsjsp.log, NSJSP 6.0 rolls over the content of the nsjsp.log file when the file size is 10 MB.
Logging in NSJSP 6.0 LogFactory in NSJSP 6.0 attribute. At this time, a new log file with the file name nsjsp.log.2009.08.29 is created and new log messages are saved in this file. If the archiveDirectory attribute is specified and if it points to a valid directory on the NonStop operating system, the rollover log files are moved to the archive directory.
Logging in NSJSP 6.0 LogFactory in NSJSP 6.0 Example 6-1. A logging.properties file # SECTION 1 – Default handlers and other possible handlers are defined. handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler, com.tandem.servlet.logging.NSJSPLogHandler .handlers = com.tandem.servlet.logging.NSJSPLogHandler # SECTION 2 – All the handlers are configured. com.tandem.servlet.logging.NSJSPLogHandler.destination = STDERR com.tandem.servlet.
Logging in NSJSP 6.0 LogFactory in NSJSP 6.0 NonStop Servlets for JavaServer Pages (NSJSP) 6.
7 Migrating to NSJSP 6.0 This chapter includes these sections: Configuration Considerations Migrating Web Applications This chapter discusses the parameters you may need to modify while migrating from NSJSP 5.0. It also discusses the new parameters introduced in NSJSP 6.0. Configuration Considerations The subsections below provide an overview of the configuration considerations before migrating to NSJSP 6.0. server.xml The iTP_server.xml file from NSJSP 5.0 does not work in NSJSP 6.
Migrating to NSJSP 6.0 servlet.config and nsjspadmin.config servlet.config and nsjspadmin.config Consider the following attributes while configuring the servlet.config and nsjspadmin.config files: startup class: NSJSP 6.0 provides only one startup class whereas NSJSP 5.0 provides a separate startup class for the SERVLET and NSJSPADMIN servers, which are listed below: NSJSP 5.0: SERVLET startup class: com.tandem.servlet.NSJSPBootstrap NSJSPADMIN startup class: com.tandem.servlet.
Migrating to NSJSP 6.0 filemaps.config filemaps.config In NSJSP 6.0, the filemaps.config file is referred by the SERVLET instances and the NSJSPADMIN instance during startup. Only the NSJSPADMIN instance can modify the filemap.config file. For more information, see filemaps.config on page 3-15. context.xml The context.xml file is an addition to NSJSP 6.0. The default session manager com.tandem.servlet.catalina.session.NSJSPStandardManager is configured in this file.
Migrating to NSJSP 6.0 Migrating Session Store Note. Although NSJSP 6.0 implements servlet 2.5 and JSP 2.1 specifications, it supports the servlet 2.4 specification. In NSJSP 6.0, the Manager and Admin applications have the contexts /servlet_jsp/manager and /servlet_jsp/admin respectively, unlike /manager and /admin in NSJSP 5.0. NonStop Servlets for JavaServer Pages (NSJSP) 6.
8 Security Considerations This chapter includes these sections: Virtual Hosts Roles Single Sign-On The Admin Web application directly changes the attributes of the NSJSP 6.0 container, which affects every application running in the container. The Manager Web application enables you to install, deploy, and control all web applications running in the NSJSP container.
Security Considerations Single Sign-On NonStop Servlets for JavaServer Pages (NSJSP) 6.
A JMXProxy Servlet The JMX Proxy Servlet is a lightweight proxy that gets and sets NSJSP internal objects by using JMX MBeans. Although the admin web application can perform most of the functions, using the JMX Proxy Servlet simplifies writing control scripts (especially, if you are monitoring and performing minor attribute changes). The -DEnableJMXProxyServlet=true Java system property enables the JMXProxy Servlet. The JMXProxy Servlet is disabled by default (property value set to false).
JMXProxy Servlet JMX Set command NonStop Servlets for JavaServer Pages (NSJSP) 6.
B Client Deployer in NSJSP 6.0 The Client Deployer is a package in NSJSP 6.0 that is used to validate, compile, compress to .WAR, and deploy web applications to NSJSP. You can use the Client Deployer package to build applications on operating systems other than NonStop, and deploy applications on NSJSP 6.0 running on NonStop operating system. Prerequisites To understand the concept of Client Deployer, you must have a good understanding of: Apache Ant For information on Apache Ant, refer http://ant.
Client Deployer in NSJSP 6.0 Setting up an environment in Windows OS Setting up an environment in Windows OS This subsection describes the procedure to set up a Client Deployer environment in the Windows OS. As a result, the applications can be built on Windows OS and can be deployed on the NSJSP server running on NonStop server. It is assumed that Apache Ant is installed at the location where the deployer is being installed. To install the deployer environment: 1. Create a deployer directory. 2.
Client Deployer in NSJSP 6.0 Configuring NSJSP-specific attributes for Client Deployer will be deployed under the context path /first and a filemap entry must be made for the application /first. The Client Deployer does not change the filemaps.config file. If appendContext is set to false, the application must have an equivalent entry in the filemaps.config file, for it to be accessible by you. Note. For more information on Client Deployer, refer http://tomcat.apache.org/tomcat-6.0doc/deployer-howto.html.
Client Deployer in NSJSP 6.0 Configuring NSJSP-specific attributes for Client Deployer Example B-1. Sample Ant Script for the Client Deployer PAGE 171C NSJSP Container Objects The container objects you can administer using JMX technology are: Server Object on page C-1 Service Object on page C-1 Connector Object on page C-2 Engine Object on page C-2 Host Object on page C-2 Context and Default Context Objects on page C-3 Loader Object on page C-3 Manager Object on page C-3 Manager Object on page C-3 Resources on page C-3 Realm Object on page C-4 Valve Object on page C-5 Server Object The Server object represents the NSJSP conta
NSJSP Container Objects Connector Object Connector Object The Connector object represents a communication endpoint on which requests are received from a client. NSJSP uses an NonStop specific connector which works with iTP WebServer to process requests. Note. NSJSP does not make use of the Nio implementation of Tomcat. Therefore all the connector properties of the connector Nio implementation are not used in NSJSP. For mor information on Connect object, refer http://tomcat.apache.org/tomcat-6.
NSJSP Container Objects Context and Default Context Objects Context and Default Context Objects The Context object represents an individual web application. The Default Context object represents a subset of the configurable properties of a Context and is used to set defaults for those properties when web applications are automatically deployed. For more information on Context object, refer http://tomcat.apache.org/tomcat-6.0doc/config/context.html.
NSJSP Container Objects Realm Object Realm Object A Realm object represents a database of information about authorized users, their passwords, and their granted access roles. Many types of Realms are supported in the NSJSP container. Property list varies for different types of Realms. The Realm objects and their associated properties are: JDBCRealm Properties For information on JDBC properties, refer http://tomcat.apache.org/tomcat-6.0doc/realm-howto.html#JDBCRealm.
NSJSP Container Objects Valve Object Valve Object A Valve object represents a component that is inserted into the request-processing pipeline. Different valves have distinct processing capabilities, such as providing access logging and request filtering. The property list varies for different types of Valve objects. The Valve objects are.
NSJSP Container Objects Valve Object NonStop Servlets for JavaServer Pages (NSJSP) 6.
Glossary This glossary defines terms used both in this manual and in other HP manuals. Both industry-standard terms and HP-specific terms are included. authentication. The process of identifying an individual, usually based on a username and password. In security systems, authentication is distinct from authorization, which is the process of giving individuals access to system objects based on their identity.
Glossary DNS DNS. See Domain Name Server (DNS). Document Type Definition (DTD). A DTD states what tags and attributes are used to describe content in an SGML document, where each tag is allowed, and which tags can appear within other tags. For example, in a DTD one could say that LIST tags can contain ITEM tags, but ITEM tags cannot contain LIST tags. In some editors, when authors are inputting information, they can place tags only where the DTD allows.
FTP Glossary or XML respectively. As with Handlers, additional Formatters may be developed by third parties. FTP. See File Transfer Protocol (FTP). gateway. A special-purpose, dedicated computer that attaches to two or more networks and routes packets from one to the other. In particular, an Internet gateway routes Internet Protocol (IP) datagrams among the networks to which it is connected.
Glossary Internet address Internet address. The 32-bit address assigned to hosts that want to participate in the Internet using TCP/IP. Internet addresses are the abstraction of physical hardware addresses, just as the Internet is an abstraction of physical networks. Actually assigned to the interconnection of a host to a physical network, an Internet address consists of a network portion and a host portion. The partition makes routing efficient. Internet Protocol (IP).
Glossary JPEG JPEG. See Joint Photographic Expert Group (JPEG). JSP. See JavaServer Page (JSP) key database file. The file in which you maintain keys you generated using the keyadmin command with either the -mkpair or -keydb argument. These are the keys you use to generate certificates for software encryption. Compare WID keyfile. Key Exchange Key (KEK). An encryption key used to encrypt other keys. LDAP. See Lightweight Directory Access Protocol (LDAP). Level.
Glossary OSS applications the OSS environment use the OSS application program interface (API); interactive users of the OSS environment use the OSS shell for their command interpreter. OSS applications. POSIX compliant applications. OSS. See Open System Services (OSS). packet. The unit of data sent across a packet-switching network.
Glossary server server. A process or set of processes that satisfy requests from web clients in a clientserver environment. server class. A grouping of duplicate copies of a single server program, all of which execute the same object program. server process. A process that implements requests for an application and returns replies to the requester. server programs. In NonStop TS/MP, programs that handle the data manipulation and data output activities for online transaction processing applications.
TELNET Glossary TELNET. The Internet standard protocol for remote terminal connection service. TELNET allows a user at one site to interact with remote timesharing systems at another site just as if the user’s terminal is connected directly to the remote machine.
Glossary WID keyfile WID keyfile. The file in which you maintain keys you generated using the keyadmin command with the -websafegen argument. These are the keys you use to generate certificates for hardware encryption. Compare key database file. World Wide Web (WWW) protocols. The WWW protocols were first defined by the CERN project in Switzerland and were later extended by a number of groups, most notably by the National Center for SuperComputing Applications (NCSA) at the University of Illinois.
Glossary NonStop Servlets for JavaServer Pages (NSJSP) 6.
Index A Abstract Windows Toolkit (AWT) 4-4 Admin Web Application administering connector objects 4-17 administering context objects 4-18 administering default context objects 4-19 administering host objects 4-18 administering realm objects 4-20 administering resources 4-22 administering server objects 4-15 administering service and engine objects 4-16 administering user definition 4-24 administering valve objects 4-21 environment entries 4-23 login and security 4-12 mail sessions 4-23 resource links 4-23 us
D Index JDBCRealm attribute 3-28 JNDIRealm attribute 3-31 Considerations 8-1 Container objects context and default context C-3 host C-2 loader C-3 manager C-3 realm C-4 resource C-4 server C-1 service C-1 valve C-5 container objects 4-8 Container/JVM process 3-42 Context element 3-23, 3-40/3-41, 3-43 cookies 3-40 cron job 5-20 D deallocating resources 4-5 defaultHost attribute 3-22 deployment descriptor 3-1, 3-14 destroy() method 4-4, 4-5 digest JDBCRealm attribute 3-28 JNDIRealm attribute 3-31, 3-36, 3-
I Index forms 4-1 HTTP cookies 3-41 protocol 1-1 response headers 4-2, 4-5 sessions 3-41 HTTPD process 1-3 HTTPS protocol 4-8 HttpServlet class 4-4 HttpServletRequest class 4-5 HttpServletResponse class 4-5 I init(ServletConfig) method 4-4 input stream, accessing 4-1 international character set 4-8 IPSetup 2-1 iTP Secure WebServer creation of servlets 1-3 V6.0 SPR ABM 2-1 iTPWebSessionId cookie name 4-8 iTP_catalina.
M Index M out-of-process servlet container 1-3 Manager element 3-42, 3-43/3-44 Manager Web Application accessing 5-2 application area 5-6 complete NSJSP status 5-16 deploy area 5-9 manager area 5-5 message box 5-5 NSJSP container status 5-12 NSJSP information area 5-9 NSJSP status command 5-11 security constraints 5-2 user interface 5-2 mapping file 3-1 Maxservers attribute 4-6 MD5 3-39 memory allocation pool, maximum 3-3 MemoryRealm attributes 3-24 definition 3-23, 3-24 rules of operation 3-25 methods
P Index P passwords clear text 3-40 digested 3-40 storing 3-24, 3-28 password, users file attribute 3-25 pathname, MemoryRealm attribute 3-24 Pathway CGI interfaces 4-7 PATH_INFO environment variable 4-1, 4-5 PATH_TRANSLATED environment variable 4-1, 4-5 performance benefits 4-2 permissions, assigning additional to web applications 3-16 persistence 4-2, 4-6 persistent data store 3-44 persistent session data 3-42 persistent sessions configuring 3-42 using 4-6 persistent store 3-44 Q Query strings, appende
T Index DSessionBasedLoadBalancing 3-6 -Xmx 3-3 -Xnoclassgc 3-4 -Xss 3-4 passing information 4-1 referring to in HTML document 4-1 Servlet API 2.3 4-2/4-4 ServletException class 4-5 ServletRequest class 4-5 ServletRequest method 4-4 ServletResponse class 4-5 ServletResponse method 4-4 servlet.
W Index W Web 5-2 web.xml file 3-1 X Xmx optional argument 3-3 Xnoclassgc optional argument 3-4 Xss optional argument 3-4 Special Characters ${catalina.home} property 3-17 ${java.home} property 3-17 -Djava.io.tmpdir option 3-5 -Djava.security.manager option 3-4, 3-16 -Djava.security.
Index Special Characters NonStop Servlets for JavaServer Pages (NSJSP) 6.