----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Greetings,

I'm just getting started out with Servlets and JServ in particular.
I'm having some trouble with some of the status methods in
HttpServletRequest and also with logging.  Here's my setup:

   IRIX 6.4 on an SGI Origin 200
   java version "3.1.1 (Sun 1.1.6)"
   ApacheJServ-1.1
   Apache 1.3.12 (JServ is compiled in, not DSO.)


I have some code that looks like the following:

    public void service (HttpServletRequest request,
HttpServletResponse response)
        throws ServletException, IOException
    {
      PrintWriter out = response.getWriter();

      [ ... ]
     
      out.println("getCharacterEncoding: " +
request.getCharacterEncoding());
      out.println("getContentLength: " + request.getContentLength());
      out.println("getContentType: " + request.getContentType());
      out.println("getProtocol: " + request.getProtocol());
      out.println("getRemoteAddr: " + request.getRemoteAddr());
      out.println("getRemoteHost: " + request.getRemoteHost());
      out.println("getServerName: " + request.getServerName());
      out.println("getServerPort: " + request.getServerPort());
      out.println("getAuthType: " + request.getAuthType());
      out.println("getMethod: " + request.getMethod());
      out.println("getPathInfo: " + request.getPathInfo());
      out.println("getPathTranslated: " +
request.getPathTranslated());
      out.println("getQueryString: " + request.getQueryString());

   }


Many of the calls to my request object return null or otherwise
invalid data:

        getContentLength: -1
        getContentType: null
        getRemoteAddr: 255.255.255.255
        getRemoteHost: 
        getAuthType: null
        getPathInfo: null
        getPathTranslated: null
        getQueryString: null
        
In particular I am concerned about getting the remote hostname and IP
addr.  It seems like JServ can't get some of this data for some
reason.  My apache access_log has DNS enabled, and resolves hosts
properly.  But my JServ-generated msgs all have 255.255.255.255 as
the host.  It also looks like my apache error_log has the same
problem.  I see things like:

  [Mon May 22 00:08:33 2000] [error] [client 255.255.255.255] File
does
  not exist: /usr/local/apache/htdocs/robots.txt


Any help would be appreciated.


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to