Contents
HP Open Source Middleware Stacks Blueprint
Copyright 2007 Hewlett-Packard Development Company, L.P
Table of Contents
Monitor Tomcat with OpenView Tomcat SPI
Webalizer Usage Report
Oracle Database Test
Page
List of Tables
Page
HP Services
Introduction
Executive Summary
Intended Audience
Typographic Conventions
HP Encourages Your Comments
UserInput
Feedback@fc.hp.com
HP Open Source Web Server Middleware Stack
Web Server Stack Architecture
Web Server Stack Architecture
Installing the Linux Distribution
Installing and Verifying the Linux Distribution
Required Packages and Installation Recommendations
Verifying the Linux Distribution Installation
YaST Software Selection and System Tasks
Configuring the Basic Apache Http Server
Installing and Configuring Sun JDK on an HP Proliant System
Tomcat
# /etc/init.d/apache2 start
For the alljava.sh file, add the following lines
# ln -s /usr/java/jdk1.5.010 /usr/local/jdk
For the alljava.csh file, add the following lines
Installing and Configuring Tomcat
# java -version
Following messages appear
# /usr/local/apache-tomcat/bin/startup.sh
Advanced Apache Http Server Features
Using the Apache Http Server Benchmarking Tool
If necessary, stop Tomcat by entering the following command
# /usr/local/apache-tomcat/bin/shutdown.sh
You can correct the error by entering the following
Apache Http Server Status and Information
Apachemodules definition should now look like the following
Restart the Apache Http Server for the changes take effect
Apache Server Status web page opens, as shown in Figure
Apache Server Information web page opens, as shown in Figure
# /etc/init.d/apache2 restart
Apache Http Server Log
# webalizer
For detailed information, see the Webalizer website at
Using Virtual Host Support
Create the following file
Configure virtual hosting by creating a file named
Using Apache Http Server URL Redirection
On the second server, create the following Html file
Using Apache Http Server Proxy Features
Edit the following configuration file
Add the following line to the preceding file
Add the following lines to the preceding file
Error Responses and Redirects
Create the following Html file
Using Per-User Web Directories
Populate the preceding file with the following lines
Configuring the Apache and Tomcat Connector
Integrating the Web Server Stack Components
Restart Apache by entering the following command
If there are any errors, check the following log files
Insert the following line below the DocumentRoot line
Http//YOURHOSTNAME/jsp-examples
Integrating the Apache Web Server and PHP
Integrating the Apache Web Server and Perl
# rpm -q php5 apache2-modphp5
Create the following test file
Integrating the Apache Web Server and Python
Connecting Tomcat to a Database
Web page displays the following text
Connecting Tomcat and MySQL
# tar zxf mysql-connector-java-version.tar.gz
# mysqladmin -u root -p create osmsdb
# $CATALINAHOME/bin/startup.sh
# ps -efgrep mysqld
# /etc/init.d/mysql start
Connecting Tomcat and Oracle
If needed, start Tomcat by entering the following command
Http//YOURHOSTNAME8080/mysqltest.jsp
Test page opens as shown in Figure
Obtaining and Installing the Oracle Jdbc Driver
Configuring the Oracle Server
Testing the Oracle Database Connectivity
Creating an Oracle Data Source
Http//YOURHOSTNAME8080/oracleTest.jsp
Oracle Database Test
Connecting Tomcat to MySQL or Oracle Using Hibernate
Installing Hibernate, Tomcat, and JDK
Configuring a Database Driver in Tomcat
# mysql -u root -p Password
Creating a Simple Application in Tomcat
# sqlplus osmsusr/osmspass@osmsdbora
For a MySQL database server
For an Oracle database server
Asm.jar asm-attrs.jar antlr-2.7.6rc1.jar
File HibernateSessionFactory.class is generated
Preceding command creates a class file named
This directory, create a Hibernate Pojo file named
Verifying the Simple Application Operation
Http//YOURHOSTNAME8080/SimpleDemo/hibernate.jsp
Enabling Https Support in the Apache Http Server
Secure the Web Server Stack
Restart Apache by entering the following
Apache Http Server Authorization
Apache default document root is
Verify that the certificate is displayed as in Figure
Create the following test Html file
Protecting Apache Http Server Authorization with Symas CDS
If the login fails, the following message appears
Configuring Apache Http Server Services
Protecting Tomcat Authorization with Symas CDS
Html Head
Html Head
Monitor Tomcat with OpenView Tomcat SPI
# $CATALINA/bin/shutdown.sh # $CATALINA/bin/startup.sh
Software Prerequisites and Reference Guides
Tomcat SPI Components
Tools
Policies
Complete these steps
Complete these steps
Appendix B Frequently Asked Questions
# /sbin/SuSEfirewall2 stop
Appendix C Vendor Information Reference
Following are the contents of the hibernate.jsp file
Appendix D Hibernate Test Application Source Code
Page
Appendix D Hibernate Test Application Source Code