You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Keith O'Brien <Ke...@rga.com> on 2003/10/01 16:12:18 UTC

RE: Servlets / Includes - not working


> -----Original Message-----
> From: Keith O'Brien [mailto:Keith@rga.com]
> Sent: Friday, September 26, 2003 5:01 PM
> To: 'Tomcat Users List'
> Subject: Servlets / Includes - not working
> 
> 
> Hello, 
> 
> Current working environment:
> RedHat 7.3
> jakarta-tomcat-4.1.24
> apache_1.3.27
> j2sdk1.4.1_02
> 

I finally got a chance to take a look at this again. Fixing the servlets was
easy. 

Just needed to uncomment servlet-mapping in web.xml


    <servlet-mapping>
        <servlet-name>invoker</servlet-name>
        <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>

I did a search and the first thing that came up was my e-mail so figured I
should include the answer =)
Keith. 



> I setup tomcat to use multiply workers so each apache server 
> would have its
> own worker and catalina base. This setup works for serving 
> jsp pages and the
> examples page works (except Include and JSP-Servlet-JSP). 
> Also non of the
> servlets under /examples/servlets/ work. 
> 
> When I attempt to load JSP-Servlet-JSP I get a 404 error:
> 	The requested resource (/examples/servlet/servletToJsp) is not
> available.
> 
> I get the same error when I attempt to load
> <url>/examples/servlet/HelloWorldExample
> 	The requested resource 
> (/examples/servlet/HelloWorldExample) is not
> available.
> 
> The Include example <url>/examples/jsp/include/include.jsp! 
> atleast gives me
> an exception:
> 	org.apache.jasper.JasperException: 
> /jsp/include/include.jsp(10,0)
> Invalid buffer size
> 
> 
> I'm using the default web.xml file that came with tomcat so I 
> won't include
> that. But I'll include  server.xml and the important parts of 
> my httpd.conf
> file. I also attached the mod_jk.log entry for each failure. 
> 
> Hopefully someone can tell me what part of my config I messed 
> up or how to
> gets servlets and includes working. 
> 
> Please let me know if you need any additional information.  
> 
> Thanks so much for your help, 
> Keith. 
> 
> There are some comments in the config as I tried different 
> things to get it
> working. 
> -----------------------
> server.xml:
> -----------------------
> <!-- Please look at the example conf files under 
> $CATLINA_HOME for more info
> -->
> <Server port="8305" shutdown="SHUTDOWN" debug="0">
> 
> <!--  <Listener
> className="org.apache.catalina.mbeans.ServerLifecycleListener"
>             debug="0"/>
> 
>   <Listener
> className="org.apache.catalina.mbeans.GlobalResourcesLifecycle
> Listener"
>             debug="0"/>
> -->
>   <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
>             modJk="/var/www/nike-tech/libexec/mod_jk.so"
>             jkDebug="info"
>             workersConfig="/var/www/tomcat/conf/jk/workers.properties"
>             jkLog="/var/www/nike-tech/logs/mod_jk.log"
>             noRoot="false"
>             forwardAll="false"/>
> 
>   <Service name="Tomcat-Apache-modjk">
> 
>     <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
>                port="8309"
>                minProcessors="5"
>                maxProcessors="75"
>                acceptCount="10"
>                useURIValidationHack="false"
>                debug="0"/>
> 
>     <Engine name="Standalone" defaultHost="nike-tech" debug="0">
> 
>       <!-- Global logger unless overridden at lower levels -->
>       <Logger className="org.apache.catalina.logger.FileLogger"
>               prefix="catalina_log."
>               suffix=".log"
>               timestamp="true"/>
> 
>       <Host name="nike-tech"
>             debug="0"
>             appBase="/var/www/nike-tech/webapps"
>             unpackWARs="true">
>         <Listener 
> className="org.apache.ajp.tomcat4.config.ApacheConfig"
>                   append="true" />
>         <Valve className="org.apache.catalina.valves.AccessLogValve"
>                  directory="/var/www/nike-tech/logs"
>                  prefix="nike-tech_access."
>                  suffix=".log"
>                  pattern="common"/>
>         <Logger className="org.apache.catalina.logger.FileLogger"
>                 directory="/var/www/nike-tech/logs"
>                 prefix="nike-tech."
>                 suffix=".log"
>                 timestamp="true"/>
>         <Realm className="org.apache.catalina.realm.MemoryRealm" />
>       </Host>
> 
> 
>     </Engine>
>   </Service>
> </Server>
> 
> --------------------
> httpd.conf: (just relative bits) 
> --------------------
> ###
> ### mod_jk setup for tomcat
> ###
> <IfModule !mod_jk.c>
>   LoadModule jk_module libexec/mod_jk.so
> </IfModule>
> 
> AddModule mod_jk.c
> 
> <IfModule mod_jk.c>
> 
>   JkWorkersFile "/var/www/tomcat/conf/jk/workers.properties"
>   JkLogFile "/var/www/nike-tech/logs/mod_jk.log"
>   JkLogLevel debug
> 
> <Directory "/var/www/nike-tech/webapps/ROOT">
>   Options Indexes FollowSymLinks MultiViews
>   DirectoryIndex index.html index.jsp index.shtml index.htm
> </Directory>
> 
> #<Directory "/var/www/nike-tech/webapps/examples">
> #  Options Indexes FollowSymLinks MultiViews
> #  DirectoryIndex index.html index.jsp index.shtml index.htm
> #</Directory>
> 
>   JkLogLevel debug
> 
> <Location "*/WEB-INF/*">
>   AllowOverride None
>   deny from all
> </Location>
> 
> </IfModule>
> 
> ### Section 3: Virtual Hosts
> <VirtualHost 10.10.14.246>
>   ServerName nike-tech.dmz.ny.rga.com
> 
>   <IfModule mod_jk.c>
>     JkMount /ROOT/* ajp_niketech
>     JkMount /ROOT ajp_niketech
>     JkMount /* ajp_niketech
>     JkMount /examples  ajp_niketech
>     JkMount /examples/* ajp_niketech
>   </IfModule>
> </VirtualHost>
> 
> --------------------
> mod_jk.log (for JSP-Servlet-JSP) 
> --------------------
> [Fri Sep 26 16:48:24 2003]  [jk_uri_worker_map.c (460)]: Into
> jk_uri_worker_map_t::map_uri_to_worker
> [Fri Sep 26 16:48:24 2003]  [jk_uri_worker_map.c (477)]: 
> Attempting to map
> URI '/examples/jsp/jsptoserv/jsptoservlet.jsp'
> [Fri Sep 26 16:48:24 2003]  [jk_uri_worker_map.c (502)]:
> jk_uri_worker_map_t::map_uri_to_worker, Found a context match 
> ajp_niketech
> -> /
> [Fri Sep 26 16:48:24 2003]  [jk_uri_worker_map.c (502)]:
> jk_uri_worker_map_t::map_uri_to_worker, Found a context match 
> ajp_niketech
> -> /examples/
> [Fri Sep 26 16:48:24 2003]  [jk_worker.c (132)]: Into 
> wc_get_worker_for_name
> ajp_niketech
> [Fri Sep 26 16:48:24 2003]  [jk_worker.c (136)]: 
> wc_get_worker_for_name,
> done  found a worker
> [Fri Sep 26 16:48:24 2003]  [jk_ajp_common.c (1404)]: Into
> jk_worker_t::get_endpoint
> [Fri Sep 26 16:48:24 2003]  [jk_ajp_common.c (1448)]: In
> jk_endpoint_t::ajp_get_endpoint, time elapsed since last 
> request = 9 seconds
> [Fri Sep 26 16:48:24 2003]  [jk_ajp_common.c (1116)]: Into
> jk_endpoint_t::service
> [Fri Sep 26 16:48:24 2003]  [jk_ajp_common.c (295)]: Into
> ajp_marshal_into_msgb
> [Fri Sep 26 16:48:24 2003]  [jk_ajp_common.c (432)]: 
> ajp_marshal_into_msgb -
> Done
> [Fri Sep 26 16:48:24 2003]  [jk_ajp_common.c (642)]: sending 
> to ajp13 #637
> [Fri Sep 26 16:48:24 2003]  [jk_ajp_common.c (884)]: 
> ajp_send_request 2:
> request body to send 0 - request body to resend 0
> [Fri Sep 26 16:48:24 2003]  [jk_ajp_common.c (729)]: received 
> from ajp13 #60
> [Fri Sep 26 16:48:24 2003]  [jk_ajp_common.c (483)]: 
> ajp_unmarshal_response:
> status = 404
> [Fri Sep 26 16:48:24 2003]  [jk_ajp_common.c (488)]: 
> ajp_unmarshal_response:
> Number of headers is = 2
> [Fri Sep 26 16:48:24 2003]  [jk_ajp_common.c (532)]: 
> ajp_unmarshal_response:
> Header[0] [Content-Type] = [text/html;charset=ISO-8859-1]
> [Fri Sep 26 16:48:24 2003]  [jk_ajp_common.c (532)]: 
> ajp_unmarshal_response:
> Header[1] [Content-Language] = [en-US]
> [Fri Sep 26 16:48:24 2003]  [jk_ajp_common.c (729)]: received 
> from ajp13
> #759
> [Fri Sep 26 16:48:24 2003]  [jk_ajp_common.c (729)]: received 
> from ajp13 #2
> [Fri Sep 26 16:48:24 2003]  [jk_ajp_common.c (1382)]: Into
> jk_endpoint_t::done, recycling connection
> 
> 
> ----------------------------
> mod_jk.log (Include ) 
> ----------------------------
> [Fri Sep 26 16:50:16 2003]  [jk_uri_worker_map.c (460)]: Into
> jk_uri_worker_map_t::map_uri_to_worker
> [Fri Sep 26 16:50:16 2003]  [jk_uri_worker_map.c (477)]: 
> Attempting to map
> URI '/examples/jsp/include/include.jsp'
> [Fri Sep 26 16:50:16 2003]  [jk_uri_worker_map.c (502)]:
> jk_uri_worker_map_t::map_uri_to_worker, Found a context match 
> ajp_niketech
> -> /
> [Fri Sep 26 16:50:16 2003]  [jk_uri_worker_map.c (502)]:
> jk_uri_worker_map_t::map_uri_to_worker, Found a context match 
> ajp_niketech
> -> /examples/
> [Fri Sep 26 16:50:16 2003]  [jk_worker.c (132)]: Into 
> wc_get_worker_for_name
> ajp_niketech
> [Fri Sep 26 16:50:16 2003]  [jk_worker.c (136)]: 
> wc_get_worker_for_name,
> done  found a worker
> [Fri Sep 26 16:50:16 2003]  [jk_ajp_common.c (1404)]: Into
> jk_worker_t::get_endpoint
> [Fri Sep 26 16:50:16 2003]  [jk_ajp_common.c (1448)]: In
> jk_endpoint_t::ajp_get_endpoint, time elapsed since last request = 706
> seconds
> [Fri Sep 26 16:50:16 2003]  [jk_ajp_common.c (1116)]: Into
> jk_endpoint_t::service
> [Fri Sep 26 16:50:16 2003]  [jk_ajp_common.c (295)]: Into
> ajp_marshal_into_msgb
> [Fri Sep 26 16:50:16 2003]  [jk_ajp_common.c (432)]: 
> ajp_marshal_into_msgb -
> Done
> [Fri Sep 26 16:50:16 2003]  [jk_ajp_common.c (642)]: sending 
> to ajp13 #630
> [Fri Sep 26 16:50:16 2003]  [jk_ajp_common.c (884)]: 
> ajp_send_request 2:
> request body to send 0 - request body to resend 0
> [Fri Sep 26 16:50:16 2003]  [jk_ajp_common.c (729)]: received 
> from ajp13 #72
> [Fri Sep 26 16:50:16 2003]  [jk_ajp_common.c (483)]: 
> ajp_unmarshal_response:
> status = 500
> [Fri Sep 26 16:50:16 2003]  [jk_ajp_common.c (488)]: 
> ajp_unmarshal_response:
> Number of headers is = 2
> [Fri Sep 26 16:50:16 2003]  [jk_ajp_common.c (532)]: 
> ajp_unmarshal_response:
> Header[0] [Content-Type] = [text/html;charset=ISO-8859-1]
> [Fri Sep 26 16:50:16 2003]  [jk_ajp_common.c (532)]: 
> ajp_unmarshal_response:
> Header[1] [Content-Language] = [en-US]
> [Fri Sep 26 16:50:16 2003]  [jk_ajp_common.c (729)]: received 
> from ajp13
> #2052
> [Fri Sep 26 16:50:16 2003]  [jk_ajp_common.c (729)]: received 
> from ajp13
> #2052
> [Fri Sep 26 16:50:16 2003]  [jk_ajp_common.c (729)]: received 
> from ajp13
> #805
> [Fri Sep 26 16:50:16 2003]  [jk_ajp_common.c (729)]: received 
> from ajp13 #2
> [Fri Sep 26 16:50:16 2003]  [jk_ajp_common.c (1382)]: Into
> jk_endpoint_t::done, recycling connection
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org