Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
ajp through ProxyPass is sending HTTP HEAD requests as HTTP GET to servlets.

ajp through ProxyPass is sending HTTP HEAD requests as HTTP GET to servlets.

2007-08-07       - By Chad Scholes

 Back
I am using Apache 2.2.3 and Tomcat 5.0.  I use ProxyPass to ajp to send Servlet
requests from Apache to Tomcat and for some reason all HEAD requests are being
sent to my servlets as GET requests.  I probably don't have something setup
correctly but I don't know what would affect the HEAD request.

My Apache configuration for ProxyPass is set like:

  Alias /qfsearch "/var/lib/qfsearch/docs"
  <Location "/qfsearch">
     Allow from all
  </Location>
  ProxyPass /qfsearch ajp://localhost:9009/qfsearch


mod_proxy and mod_rewrite are setup as:

<IfModule mod_proxy.c>
 <Proxy *>
    Order deny,allow
    Deny from all
 </Proxy>
 ProxyRequests Off
</IfModule>

<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteLog  /var/log/apache2/rewrite_log
 RewriteLogLevel 1
</IfModule>


In the apache access log the request is getting to apache as a "HEAD" request:
137.65.79.137 - - [06/Aug/2007:14:33:45 -0600] "HEAD /qfsearch/ClusterServlet
?server=qfsearch3.provo.novell.com&type=index&putname=duh&putsubname=qfind.idx
&idxdatetime86176509000&idxlocation=%2Fvar%2Flib%2Fqfsearch%2FSites%2Fdefault
%2Findexes%2Fduh%2F2007-08-03%3B+15.28.29&put=qfind.idx&filesize709498&datetime
86176509000&do?nput HTTP/1.1" 503 - "-" "Java/1.5.0"


However, I have a servlet that overrides the service function and in that call
request.getMethod() and it is now returning "GET" not "HEAD".

If I call Tomcat directly then everything works fine (request.getMethod()
returns "HEAD"). This particular section of code has been working for years
with the JKMount command but now that we have changed to the ProxyPass it is
not working.  If you have any ideas what could be wrong I would appreciate the
help!

Thanks you!!
Chad


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)


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