Tomcat 5.5 not forwarding .jsp to Apache2. HELP!!!
- From: angelabouchard@xxxxxxxxx
- Date: 27 Jul 2005 11:47:43 -0700
Tomcat not forwarding .jsp to Apache. HELP!!!
I have been attempting this configuration for weeks but have not been
successful. I have read several docs and other peoples
experiences/scenarios/websites but nothing has worked for me. I must be
missing 1 small peice but I am burnt out and I need HELP!
http://10.50.0.33 loads the default Apache page
http://10.50.0.33:8080 loads the default Tomcat page
http://10.50.0.33/test.jsp does not translate and load as a jsp file
but loads the text.
2 + 2 = <%= 2 + 2 %>
My environment consist of the following: Apache 2.0.54, Tomcat 5.5.10,
mod_jk 1.2.10, Java 1.5 running on Solaris 9.
++++++++++++++++++++++++
Section 1 - Config files
++++++++++++++++++++++++
------------------------------------------------------
Tomcat 5.5.10, /opt/tomcat/conf/server.xml
------------------------------------------------------
**added Listener statement
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.jk.config.ApacheConfig"
modJk="/opt/apache/modul
es/mod_jk.so" workersConfig="/opt/tomcat/conf/workers.properties"/>
**changed local host to ip address
<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="10.50.0.33">
**changed localhost to ip address
<Host name="10.50.0.33" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
**added Listener just below the line above
<Listener className="org.apache.jk.config.ApacheConfig"
append="true" forw
ardAll="false" modJk="/opt/apache/modules/mod_jk.so" />
**everything else is the default settings
----------------------------------------------------------------
Tomcat 5.5.10, /opt/tomcat/conf/workers.properties
----------------------------------------------------------------
workers.tomcat_home=/opt/tomcat
workers.java_home=/usr/java
ps=/
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=10.50.0.33
worker.ajp13.type=ajp13
----------------------------------------------------------------
Tomcat 5.5.10, /opt/tomcat/conf/auto/mod_jk.conf
----------------------------------------------------------------
########## Auto generated on Wed Jul 27 11:34:17 PDT 2005##########
<IfModule !mod_jk.c>
LoadModule jk_module "/opt/apache/modules/mod_jk.so"
</IfModule>
JkWorkersFile "/opt/tomcat/conf/workers.properties"
JkLogFile "/opt/jakarta-tomcat-5.5.10/logs/mod_jk.log"
JkLogLevel emerg
<VirtualHost 10.50.0.33>
ServerName 10.50.0.33
#################### 10.50.0.33:/webdav ####################
# Static files
Alias /webdav "/opt/jakarta-tomcat-5.5.10/webapps/webdav"
<Directory "/opt/jakarta-tomcat-5.5.10/webapps/webdav">
Options Indexes FollowSymLinks
DirectoryIndex
</Directory>
# Deny direct access to WEB-INF and META-INF
#
<Location "/webdav/WEB-INF/*">
AllowOverride None
deny from all
</Location>
<Location "/webdav/META-INF/*">
AllowOverride None
deny from all
</Location>
JkMount /webdav/* ajp13
JkMount /webdav/*.jspx ajp13
JkMount /webdav/*.jsp ajp13
#################### 10.50.0.33:/servlets-examples
####################
# Static files
Alias /servlets-examples
"/opt/jakarta-tomcat-5.5.10/webapps/servlets-examples"
<Directory "/opt/jakarta-tomcat-5.5.10/webapps/servlets-examples">
Options Indexes FollowSymLinks
DirectoryIndex index.html index.htm index.jsp
</Directory>
# Deny direct access to WEB-INF and META-INF
#
<Location "/servlets-examples/WEB-INF/*">
AllowOverride None
deny from all
</Location>
<Location "/servlets-examples/META-INF/*">
AllowOverride None
deny from all
</Location>
JkMount /servlets-examples/jsp/security/protected/j_security_check
ajp13
JkMount /servlets-examples/servlet/HelloWorldExample ajp13
JkMount /servlets-examples/servlet/SessionExample ajp13
JkMount /servlets-examples/servlet/RequestHeaderExample ajp13
JkMount /servlets-examples/servlet/RequestParamExample ajp13
JkMount /servlets-examples/servlet/CookieExample ajp13
JkMount /servlets-examples/*.jspx ajp13
JkMount /servlets-examples/CompressionTest ajp13
JkMount /servlets-examples/*.jsp ajp13
JkMount /servlets-examples/servlet/RequestInfoExample/* ajp13
#################### 10.50.0.33:/jsp-examples ####################
# Static files
Alias /jsp-examples
"/opt/jakarta-tomcat-5.5.10/webapps/jsp-examples"
<Directory "/opt/jakarta-tomcat-5.5.10/webapps/jsp-examples">
Options Indexes FollowSymLinks
DirectoryIndex index.html index.htm index.jsp
</Directory>
# Deny direct access to WEB-INF and META-INF
#
<Location "/jsp-examples/WEB-INF/*">
AllowOverride None
deny from all
</Location>
<Location "/jsp-examples/META-INF/*">
AllowOverride None
deny from all
</Location>
JkMount /jsp-examples/security/protected/j_security_check ajp13
JkMount /jsp-examples/forward/one.jsp ajp13
JkMount /jsp-examples/tagplugin/foreach.jsp ajp13
JkMount /jsp-examples/dates/date.jsp ajp13
JkMount /jsp-examples/jsp2/tagfiles/panel.jsp ajp13
JkMount /jsp-examples/xml/xml.jsp ajp13
JkMount /jsp-examples/jsp2/simpletag/repeat.jsp ajp13
JkMount /jsp-examples/CompressionTest ajp13
JkMount /jsp-examples/cal/cal2.jsp ajp13
JkMount /jsp-examples/sessions/carts.jsp ajp13
JkMount /jsp-examples/tagplugin/choose.jsp ajp13
JkMount /jsp-examples/jsptoserv/jsptoservlet.jsp ajp13
JkMount /jsp-examples/jsp2/misc/config.jsp ajp13
JkMount /jsp-examples/checkbox/checkresult.jsp ajp13
JkMount /jsp-examples/security/protected/login.jsp ajp13
JkMount /jsp-examples/jsp2/simpletag/book.jsp ajp13
JkMount /jsp-examples/forward/forward.jsp ajp13
JkMount /jsp-examples/jsp2/jspx/textRotate.jspx ajp13
JkMount /jsp-examples/simpletag/foo.jsp ajp13
JkMount /jsp-examples/security/protected/index.jsp ajp13
JkMount /jsp-examples/include/include.jsp ajp13
JkMount /jsp-examples/error/err.jsp ajp13
JkMount /jsp-examples/jsp2/el/basic-arithmetic.jsp ajp13
JkMount /jsp-examples/*.jspx ajp13
JkMount /jsp-examples/jsp2/jspx/basic.jspx ajp13
JkMount /jsp-examples/snp/snoop.jsp ajp13
JkMount /jsp-examples/error/errorpge.jsp ajp13
JkMount /jsp-examples/jsp2/jspattribute/jspattribute.jsp ajp13
JkMount /jsp-examples/include/foo.jsp ajp13
JkMount /jsp-examples/jsp2/el/functions.jsp ajp13
JkMount /jsp-examples/jsp2/tagfiles/products.jsp ajp13
JkMount /jsp-examples/jsp2/simpletag/hello.jsp ajp13
JkMount /jsp-examples/jsp2/el/basic-comparisons.jsp ajp13
JkMount /jsp-examples/colors/colrs.jsp ajp13
JkMount /jsp-examples/jsp2/jspattribute/shuffle.jsp ajp13
JkMount /jsp-examples/num/numguess.jsp ajp13
JkMount /jsp-examples/*.jsp ajp13
JkMount /jsp-examples/plugin/plugin.jsp ajp13
JkMount /jsp-examples/source.jsp ajp13
JkMount /jsp-examples/servletToJsp ajp13
JkMount /jsp-examples/tagplugin/if.jsp ajp13
JkMount /jsp-examples/cal/cal1.jsp ajp13
JkMount /jsp-examples/jsp2/tagfiles/hello.jsp ajp13
JkMount /jsp-examples/jsptoserv/hello.jsp ajp13
JkMount /jsp-examples/jsp2/misc/dynamicattrs.jsp ajp13
JkMount /jsp-examples/security/protected/error.jsp ajp13
JkMount /jsp-examples/jsp2/el/implicit-objects.jsp ajp13
#################### 10.50.0.33:/balancer ####################
# Static files
Alias /balancer "/opt/jakarta-tomcat-5.5.10/webapps/balancer"
<Directory "/opt/jakarta-tomcat-5.5.10/webapps/balancer">
Options Indexes FollowSymLinks
DirectoryIndex index.html index.htm index.jsp
</Directory>
# Deny direct access to WEB-INF and META-INF
#
<Location "/balancer/WEB-INF/*">
AllowOverride None
deny from all
</Location>
<Location "/balancer/META-INF/*">
AllowOverride None
deny from all
</Location>
JkMount /balancer/*.jspx ajp13
JkMount /balancer/*.jsp ajp13
#################### 10.50.0.33:/tomcat-docs ####################
# Static files
Alias /tomcat-docs "/opt/jakarta-tomcat-5.5.10/webapps/tomcat-docs"
<Directory "/opt/jakarta-tomcat-5.5.10/webapps/tomcat-docs">
Options Indexes FollowSymLinks
DirectoryIndex index.html index.htm index.jsp
</Directory>
# Deny direct access to WEB-INF and META-INF
#
<Location "/tomcat-docs/WEB-INF/*">
AllowOverride None
deny from all
</Location>
<Location "/tomcat-docs/META-INF/*">
AllowOverride None
deny from all
</Location>
JkMount /tomcat-docs/*.jspx ajp13
JkMount /tomcat-docs/*.jsp ajp13
</VirtualHost>
-------------------------------------------------------
Apache 2.0.54, /opt/apache/conf/httpd.conf
-------------------------------------------------------
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 10.50.0.33:80
# If your host doesn't have a registered DNS name, enter its IP address
here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
#ServerName www.example.com:80
ServerName 10.50.0.33:80
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
#NameVirtualHost *:80
Include /opt/tomcat/conf/auto/mod_jk.conf
**everything else is the default settings
+++++++++++++++++++++++++++++
Section 2 - Tomcat Log files
+++++++++++++++++++++++++++++
-------------------------------------------------------
Tomcat 5.5.10, /opt/tomcat/logs/catalina.out
-------------------------------------------------------
Jul 27, 2005 11:34:17 AM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Portable Runtime which allows optimal performance in
production environments was not found on the java.library.path:
/usr/jdk1.5.0_02/jre/lib/sparc/server:/usr/jdk1.5.0_02/jre/lib/sparc:/usr/jdk1.5.0_02/jre/../lib/sparc:/usr/local/lib:/usr/local/ssl/lib:/usr/local/include:/usr/local/magick/lib/ImageMagick-6.0.4:/usr/lib
Jul 27, 2005 11:34:17 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 27, 2005 11:34:17 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2086 ms
Jul 27, 2005 11:34:18 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 27, 2005 11:34:18 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.10
Jul 27, 2005 11:34:18 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jul 27, 2005 11:34:20 AM org.apache.catalina.core.ApplicationContext
log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain:
[org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string:
News / Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param
name: paramName / Target param value: paramValue / Redirect URL:
http://www.yahoo.com],
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:
http://jakarta.apache.org]]
Jul 27, 2005 11:34:20 AM org.apache.catalina.core.ApplicationContext
log
INFO: ContextListener: contextInitialized()
Jul 27, 2005 11:34:20 AM org.apache.catalina.core.ApplicationContext
log
INFO: SessionListener: contextInitialized()
Jul 27, 2005 11:34:21 AM org.apache.catalina.core.ApplicationContext
log
INFO: ContextListener: contextInitialized()
Jul 27, 2005 11:34:21 AM org.apache.catalina.core.ApplicationContext
log
INFO: SessionListener: contextInitialized()
Jul 27, 2005 11:34:22 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 27, 2005 11:34:23 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jul 27, 2005 11:34:23 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/289 config=null
Jul 27, 2005 11:34:23 AM org.apache.catalina.storeconfig.StoreLoader
load
INFO: Find registry server-registry.xml at classpath resource
Jul 27, 2005 11:34:24 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 6305 ms
**shouldn't ajp13 be listening on 10.50.0.33?
-----------------------------------------------------
Tomcat 5.5.10, /opt/tomcat/logs/mod_jk.log
------------------------------------------------------
null
+++++++++++++++++++
Apache 2.0.54 Logs
+++++++++++++++++++
----------------------------------
/opt/apache/logs/error_log
-----------------------------------
No JkShmFile defined in httpd.conf. LoadBalancer will not function
properly!
[Wed Jul 27 11:35:08 2005] [emerg] No JkShmFile defined in httpd.conf.
LoadBalan
cer will not function properly!
[Wed Jul 27 11:35:08 2005] [notice] Digest: generating secret for
digest authent
ication ...
[Wed Jul 27 11:35:08 2005] [notice] Digest: done
No JkShmFile defined in httpd.conf. LoadBalancer will not function
properly!
[Wed Jul 27 11:35:09 2005] [emerg] No JkShmFile defined in httpd.conf.
LoadBalan
cer will not function properly!
[Wed Jul 27 11:35:09 2005] [notice] Apache/2.0.54 (Unix) DAV/2
mod_jk/1.2.10 con
figured -- resuming normal operations
----------------------------------
/opt/apache/logs/access_log
-----------------------------------
10.50.0.52 - - [27/Jul/2005:11:39:57 -0700] "GET / HTTP/1.1" 200 1456
10.50.0.52 - - [27/Jul/2005:11:39:57 -0700] "GET /apache_pb.gif
HTTP/1.1" 200 23
26
10.50.0.52 - - [27/Jul/2005:11:40:19 -0700] "GET /test.jsp HTTP/1.1"
200 21
**It does not show me attempting to access http://10.50.0.30:8080 and
the Tomcat logs does not capture it either.
-----------------------------------------------------
Here's the environment variables I have set:
-----------------------------------------------------
APACHE_HOME=/opt/apache
CATALINA_HOME=/opt/jakarta-tomcat-5.5.10
CLASSPATH=/usr/jdk1.5.0_02:/opt/jakarta-tomcat-5.5.10/bin/bootstrap.jar:/usr/jdk1.5.0_02/lib/tools.jar:/opt/jakarta-tomcat-5.5.10/common/lib/servlet-api.jar
JAVA_HOME=/usr/jdk1.5.0_02
LD_LIBRARY_PATH=/usr/local/lib:/usr/local/ssl/lib:/usr/local/include:/usr/local/magick/lib/ImageMagick-6.0.4
MANPATH=/usr/local/man:/usr/dt/man:/usr/man:/usr/openwin/share/man
PATH=/usr/local/bin:/usr/local/sbin:/var/pgsql/bin:/usr/local/lib:/usr/local/magick/lib:/usr/lib:/usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/bin:/usr:/usr/java/bin:/usr/ucb:/usr/ccs/bin:/opt/apache:/opt/apache/bin:/opt/resin-3.0.4:/opt/ant/bin:/opt/jakarta-tomcat-5.5.10:/opt/apache/bin:.
TOMCAT_HOME=/opt/jakarta-tomcat-5.5.10
.
- Prev by Date: j2ee installation help windowsxp
- Next by Date: Re: Screen scrape an applet?
- Previous by thread: j2ee installation help windowsxp
- Next by thread: need an unsigned int in java, so...
- Index(es):
Relevant Pages
|