| Red Hat Docs > Manuals > Red Hat Applications > |
| Red Hat Enterprise Web Application Framework Installation Guide | ||
|---|---|---|
| Prev | Chapter 3. Installing the Binary Distribution | Next |
This section contains specific notes about configuring WAF for specific servlet containers.
To prevent the enterprise.init from running twice at server startup, either:
Configure your servlet container so that it does not automatically reload webapps underneath the webapp directory.
Deploy your webapp to a non-standard webapp directory. This is the only option in Tomcat 4:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/host.html#Automatic%20Application%20Deployment |
Red Hat does not recommend using Tomcat 3.x due to several well-known bugs and performance problems. Instead, use Tomcat 4, the successor to Tomcat 3, which has vastly improved performance and stability.
If you must use Tomcat 3.3.x, make sure that your web.xml contains the following lines:
<servlet> <servlet-name>jsp</servlet-name> <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> </servlet> |
Alternatively, set the useJspServlet attribute of the JspInterceptor tag to "true" in server.xml. Not doing so will result in a NullPointerException when viewing any JSP page.
Remove /etc/tomcat3/conf/apps-admin.xml ($TOMCAT_HOME/conf/apps-admin.xml on a non-RPM install) or edit it and change path="/admin" to path="/tomcat-admin".
![]() | Note |
|---|---|
Do not use Tomcat 4.0.3. It will result in a security exception at server startup. Instead, use Tomcat 4.0.6 (or later) or Tomcat 4.1.x. |
There are several changes that you will have to manually make to your Tomcat 4 installation to make it work properly with WAF.
First, if you are using an RPM of Tomcat, open the file:
/usr/bin/dtomcat4 |
Otherwise open the file:
$CATALINA_HOME/bin/setclasspath.sh |
Change the line
CLASSPATH="$JAVA_HOME"/lib/tools.jar |
to read as:
CLASSPATH="$CLASSPATH":"$JAVA_HOME"/lib/tools.jar |
Next, you need to make sure that certain Tomcat environment variables are set when Tomcat is started. If you are using an RPM of Tomcat, open /etc/tomcat4/tomcat4.conf and add the following line to the bottom of the file:
. /var/www/ccm-core-cms/conf/tomcat-env.sh |
If you are not using an RPM, then open $CATALINA_HOME/bin/catalina.sh and add the previous line directly after the line that reads BASEDIR="$CATALINA_HOME".
In /etc/tomcat4/server.xml (or $CATALINE_HOME/conf/server.xml for a non-RPM version of Tomcat), remove the examples context. Then, add the following context:
<Context path="" docBase="/var/www/ccm-core-cms/dist" debug="2" reloadable="true"> <Logger className="org.apache.catalina.logger.FileLogger" prefix="ccm-core-cms." suffix=".log" timestamp="true"/> </Context> |
Tomcat 4.1.x uses the AElfred non-validating parser instead of the Xerces parser. To use Xerces instead, add
JAVA_OPTS="-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl"; export JAVA_OPTS |
to
/usr/share/ccm-core-cms/conf/tomcat4/tomcat-env.sh.in |
If you use, Tomcat 4.1.x, remove servlet.jar from your web application. This is due to a difference between the servlet 2.2 and 2.3 specifications.
![]() | Note |
|---|---|
j2ee.jar includes a Tomcat reference implementation that you should not use. If you have a j2ee.jar in your CLASSPATH, make sure that your tomcat.jar comes before your j2ee.jar. |
If JAVA_HOME is set incorrectly, or is not set and the JDK is installed in a nonstandard location, Resin will die with the error message Bad File Descriptor.
WAS requires that the SunJCE.jar library be imported when the application server itself is started, as opposed to when the webapp is started.