Apache Tomcat User Guide

doctorlanguidInternet and Web Development

Dec 8, 2013 (3 years and 10 months ago)

80 views

This is the top
-
level entry point of the documentation bundle for the
Apache Tomcat

Servlet/JSP container. Apache Tomcat version 6.0 implements the Servlet 2.5 and
JavaServer Pages 2.1 specifications from the
Java Communit
y Process
, and includes
many additional features that make it a useful platform for developing and deploying web
applications and web services.

Select one of the links from the navigation menu (to the left) to drill down to the more
detailed documentation

that is available. Each available manual is described in more
detail below.

Apache Tomcat User Guide

The following documents will assist you in downloading, installing Apache Tomcat 6,
and using many of the Apache Tomcat features.

1.

Introduction

-

A brief, high level, overview of Apache Tomcat.

2.

Setup

-

How to install and run Apache Tomcat on a variety of platforms.

3.

First web application

-

An introduction to the concepts of a
web application

as
defined in the
Servlet 2.4 Specification
. Covers basic organization o
f your web
application source tree, the structure of a web application archive, and an
introduction to the web application deployment descriptor (
/WEB
-
INF/web.xml
).

4.

Deployer

-

Operating the A
pache Tomcat Deployer to deploy, precompile, and
validate web applications.

5.

Manager

-

Operating the
Manager

web app to deploy, undeploy, and redeploy
applications while Apache Tomcat is runnin
g.

6.

Realms and Access Control

-

Description of how to configure
Realms

(databases
of users, passwords, and their associated roles) for use in web applications that
utilize
Container Managed Secur
ity
.

7.

Security Manager

-

Configuring and using a Java Security Manager to support
fine
-
grained control over the behavior of your web applications.

8.

JNDI Resources

-

Configuring standard and custom resources in the JNDI
naming context that is provided to each web application.

9.

JDBC DataSour
ce

-

Configuring a JNDI DataSoure with a DB connection pool.
Examples for many popular databases.

10.

Classloading

-

Information about class loading in Apache Tomcat 6, including
where to pl
ace your application classes so that they are visible.

11.

JSPs

-

Information about Jasper configuration, as well as the JSP compiler usage.

12.

SSL

-

Installing and configuring SSL support so that your Apache Tomcat will
serve requests using the
https

protocol.

13.

SSI

-

Using Server Side Includes in Apache Tomcat.

14.

CGI

-

Using CGIs with Apache Tomcat.

15.

Proxy Support

-

Configuring Apache Tomcat 6 to run behind a proxy server (or
a web server functioning as a proxy server)
.

16.

MBean Descriptor

-

Configuring MBean descriptors files for custom
components.

17.

Default Servlet

-

Configuring the de
fault servlet and customizing directory
listings.

18.

Apache Tomcat Clustering

-

Enable session replication in a Apache Tomcat
environment.

19.

Balancer

-

Configuring, using, and extending the load balancer application.

20.

Connectors

-

Connectors available in Apache Tomcat, and native web server
integration.

21.

Monitoring and Management

-

Enabling JMX Remote support, and using tools
to monitor and manage Apache Tomcat.

22.

Logging

-

Configuring logging in Apache Tomcat.

23.

Apache Portable Runtime

-

Using APR to provide superior performance,
scalability and better integration with native server technologies.

24.

Virtual Hosting

-

Configuring vitual hosting in Apache Tomcat.

25.

Advanced IO

-

Extensions available over regular, blocking IO.

26.

Additional Compo
nents

-

Obtaining additional, optional components.

Reference

The following documents are aimed at
System Administrators

who are responsible for
installing, configuring, and operating a Apache Tomcat 6 server.



Release notes

-

Known issues in this Apache Tomcat release.



Apache Tomcat Server Configuration Reference

-

Reference manual that
documents all available elements and attri
butes that may be placed into a Apache
Tomcat 6
conf/server.xml

file.



JK Documentation

-

Complete documentation and HOWTOs on the JK native
webserver connector, used to interface Apache To
mcat with servers like Apache
HTTPd, IIS and others.



Servlet API Javadocs

-

The Servlet 2.5 API Javadocs.



JSP API Javadocs

-

The JSP 2.1 API Javadocs.

Apache Tomcat Developers

The following documents are for Java developers who wish to contribute to the
development of the
Apache Tomcat

project.



Building from Source

-

Details the steps necessary to download Apache Tomcat
6 source code (and the other packages that it depends on), and build a binary
distribution from those sources.



Changelog

-

Details the changes made to Apache Tomcat.



Status

-

Apache Tomcat development status.



Developers

-

List of active
Apache Tomcat contributors.



Functional Specifications

-

Requirements specifications for features of the
Catalina

servlet container portion of Apache Tomcat 6.



Javadocs

-

Javadoc API documentation for Apache Tomcat's internals.



Apache Tomcat Architecture

-

Documentation of the Apache Tomcat Server
Architecture.


Im
portant Note!

Websphere is not currently tested or certified for use with Alfresco Enterprise (see
http://www.alfresco.com/services/suppo
rt/stacks/

for the full list of supported stacks).

[
edit
]

Alfresco 2.1 on WebSphere 6
.1

[
edit
]

Introduction

This page is a guide to installing Alfresco 2.1 on WebSphere 6.1 running on Fed
ora Core
6 and to track the current issues. Some issues will be common to installation on other
platforms. Note, the same instructions are valid for Windows platforms too.

The WAS documentation can be found at
http://www
-
306.ibm.com/software/webservers/appserv/was/library
.

[
edit
]

Configuration

1.

Add the jar to support your database connection to
{WebSphereInsatllDir}/{AppServerName}/lib.

2.

Install Alfresco webapp using the Websphere console.

3.

Set the Classloader p
roperties for the Alfresco Enterprise Application to be:

o

Classes loaded with the application class loader first

o

Single class loader for application

4.

Create a Shared Library reference for the Database Connector in the Websphere
console

o

Enterprise Applica
tion
-
> alfresco_war page

o

References
-

Shared Library references link

o

tick the alfresco... app, then click the Reference Shared Libraries button

o

click New to create a new shared lib ref

o

give it a name, and in the classpath section add the full path to
the
Database's JDBC jars

5.

Modify the Java Heap size so that you don't get any out of memory problems

o

Servers
-
> Application Servers
-
> Server1
-
> Process Definition (in Java
and Process Management)
-
> Java Virtual Machine

o

Set min and max heap sizes

o

Can
also set
-
XX:MaxPermSize=128m (or any other value) in the Generic
JVM Args field.

6.

Rename / remove the xml
-
apis.jar file from the deployed Alfresco application's
WEB
-
INF/lib dir

o

this resolves conflicts with the Enterprise License component of Alfresco

7.

Th
e Alfresco extension files should be placed in one of the paths included in the
'ws.ext.dirs' setting.

o

e.g. {WebSphereInsatllDir}/{AppServerName}/lib.

o

The file structure would then look like:
{WebSphereInsatllDir}/{AppServerName}/lib/alfresco/extension

If configured correctly, the alfresco.log will contain a warning that both the
MyFaces and RI implementations of JSF have been found on the classpath.

[
edit
]

Enabling WCM

You will need the WCM bootstrap context on the class path.

Copy root/projects/installer/wcm
-
bootstrap
-
context.xml to
{WebSphereInsatllDir}/{AppServerName}/lib/alfresco/extension or some
other suitable
location on the classpath.


[
edit
]

Work

around for issues loading libraries bundled with the JRE

Edit /etc/sysconfig/selinux

Make sure SELINUX is set to disabled ....

SELINUX=disabled

Reboot

Your class loading issues should be solved


[
edit
]

Known JDK issues

There have been issues with nio not writing content to the index info files. This has been
seen on AIX and now FC6 in vmware. Oth
ers have not seen this issue.

There are some details on the forums.

This seems to be down to the JDK.

Upgrading to WAS 6.1.0.7 and then upgrading the embedded JRE seems to have resolved
this issue. This updates to 1.5.0 SR4. The unit test seem to be fin
e with 1.5.0 SR3.

[
edit
]

Known / Old / Resolved issues

WCM

Mixed JSTL and JSP pages
may be broken e.g the end of the create web site
wizard

MyFaces

Using default deployment configurations there can be clashes with the MyFaces
libs. There are at least four solutions

1.

Follow the steps documented above!

2.

Follow the IBM guide to use myfaces

using a shared library
http://www
-
1.ibm.com/support/docview.wss?uid=swg21243668


3.

Configure class loading to use the appl
ication libraries first. There is no need to
copy files to {WebSphereInsatllDir}/{AppServerName}/lib or delete jsf files
from the war.

4.

Following the myfaces guide to installation on WAS and articles oni the forum.
See
http://wiki.apache.org/myfaces/Websphere_Installation?highlight=%28websphere
%29

and the forum discussion
http://forums.alfresco.com/viewtopic.php?t=6659
.

o

Copy the following files from the alfresco distribution (alfrecso.war
/WEB_INF/lib in the alfres
co war) to
{WebSphereInsatllDir}/{AppServerName}/lib. I also fixed all the jar
permissions to match those already in the lib area.



commons
-
beanutils
-
1.7.0.jar



commons
-
codec
-
1.3.jar



commons
-
collections
-
3.1.jar



commons
-
digester
-
1.6.jar



commons
-
el.jar



c
ommons
-
lang
-
2.1.jar



jstl
-
1.1.0.jar



myfaces
-
api
-
1.1.5.jar



myfaces
-
impl
-
1.1.5.jar

o

Note, there seems to be no need to copy the files below into
{WebSphereInsatllDir}/{AppServerName}/lib. WAS includes an
embedded version of xalan and modified javax.xml.* i
n deploy.jar.



serializer.jar



xalan.jar

If configured correctly, the alfresco.log will contain a warning that both the
MyFaces and RI implementations of JSF have been found on the classpath.

AJAX clashes between Websphere and Alfresco



Rename / remove t
he ajax.jar files from Websphere (or follow the steps above!)

WAS related fix ups

1.

WAS includes its own modifications to commons logging. So it is necessary to
remove WEB
-
INF
\
lib
\
commons
-
logging.jar (or follow the steps above!)

Logging

Configure logging
. After removing the logging jar alfresco specific logs are reported but
there is a bit too much logging from other embedded areas.

Retrieved from
"
http://wiki.alfresco.co
m/wiki/Installing_Older_Versions_on_WebSphere
"

Categories
:
Installation

|
2.1