Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Tomcat, mod_jk and Apache works with examples but not with another page

Marcia de Oliveira Cardoso

2003-08-12

Replies:

Versions:
Tomcat 4.1.24
Apache 1.3.28
using mod_jk1.2.3
OS : FreeBSD 4.8

1 - Tomcat seems to work.
  http://localhost:8180 works - the Tomcat page appears.
  http://localhost:8180/examples/jsp/index.html works too
  I tested the examples and everything works fine.

2 - I have some users that want to use jsp. So I need a mechanism to do this:
  I tested with one user - configured a Context in server.xml like this:

        <Context path="/jmvargas" docBase="/www/jmvargas/public_html" debug="0"
          reloadable="false" crossContext="true">
    </Context>
  So I tried to get it:
  http://localhost:8180/jmvargas
  And it works.

Now, my problem:

4 - I decided to use mod_jk so that my web server, apache, could pass *.jsp to Tomcat.

  I put an Alias in httpd.conf
    Alias /jmvargas /www/jmvargas/public_html

  And the include to mod_jk.conf
    Include /usr/local/etc/apache/mod_jk.conf

  And my mod_jk.conf and workers.properties are:
-----------------------------------------------------------mod_jk.conf
     <IfModule mod_jk.c>
    JkWorkersFile /usr/local/etc/apache/workers.properties
    JkLogFile /var/log/mod_jk.log
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkRequestLogFormat "%w %V %T"
    JkMount /*.jsp tomcat-acd
    JkMount /servlet/* tomcat-acd
    JkMount /examples/* tomcat-acd
    JkMount /jmvargas/curso/*.jsp tomcat-acd
    JkMount /jmvargas/*.jsp tomcat-acd
</IfModule>
-------------------------------------------------------workers.properties
worker.list=tomcat-acd
worker.tomcat-acd.type=ajp13
worker.tomcat-acd.host=localhost
worker.tomcat-acd.port=8009
#worker.tomcat-acd.lbfactor=1
worker.tomcat-acd.lbfactor=50
worker.tomcat-acd.cachesize=10
worker.tomcat-acd.cache_timeout=600
worker.tomcat-acd.socket_keepalive=1
worker.tomcat-acd.socket_timeout=300

5 - Re-started Tomcat and Apache
  Tested again: http://localhost:8180/jmvargas/curso - work
  Testing without 8180 port : http://localhost/jmvargas/curso - not working
  Testing without8180 port with examples: http://localhost/examples - works

 Error: This appears when I call http://localhost/jmvargas/curso (from index.html) or http://localhost/jmvargas/curso/index.jsp
      But the URL http://localhost:8180/jmvargas/curso/index.jsp still works
HTTP Status 500 - Internal Server Error

--------------------------------------------------------------------------------

type Exception report

message Internal Server Error

description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException:
........

------------------------The localhost_log file indicates:

2003-08-08 11:00:15 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp
threw exception
org.apache.jasper.JasperException:
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:254)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:2
95)
    at org.apache.jasper.servlet.JspServlet.service (JspServlet.java:241)
    at javax.servlet.http.HttpServlet.service (HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:256)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
    at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:995)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex


--------------------------------------------------------------------------------------------
What is wrong?

Marcia


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.