javax.servlet.http.HttpServlet  
//to receive
    service() method
   {
    Enumeration reqHeaderEnum = req.getHeaderNames();
    while( reqHeaderEnum.hasMoreElements() ) {
        String headerName = (String)reqHeaderEnum.nextElement();
//THIS IS THE HEADER NAME
        responseString += CRLF + headerName + ": " +
        req.getHeader(headerName); 
//THIS IS THE VALUE assigned to HEADER_NAME
    }

//to send
  /**
     * <p>Receives an HTTP HEAD request from the protected
     * <code>service</code> method and handles the
     * request.
     * The client sends a HEAD request when it wants
     * to see only the headers of a response, such as
     * Content-Type or Content-Length. The HTTP HEAD
     * method counts the output bytes in the response
     * to set the Content-Length header accurately.
     *
     * <p>If you override this method, you can avoid computing
     * the response body and just set the response headers
     * directly to improve performance. Make sure that the
     * <code>doHead</code> method you write is both safe
     * and idempotent (that is, protects itself from being
     * called multiple times for one HTTP HEAD request).
     *
     * <p>If the HTTP HEAD request is incorrectly formatted,
     * <code>doHead</code> returns an HTTP "Bad Request"
     * message.
     *
     * @param req    the request object that is passed
     *            to the servlet
     *            
     * @param resp    the response object that the servlet
     *            uses to return the headers to the clien
     *
     * @exception IOException        if an input or output error occurs
     *
     * @exception ServletException    if the request for the HEAD
     *                    could not be handled
     */
    protected void doHead(HttpServletRequest req, HttpServletResponse resp)
    throws ServletException, IOException
    {
    }

definitiv möglicherweise?
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.






> Date: Mon, 8 Jun 2009 18:34:04 +0200
> From: alexander.muel...@brz.gv.at
> To: users@tomcat.apache.org
> Subject: Re: Header names lower case
> 
> 
> > "apparently"? Hm, in this case I'd double-check whether whatever problem
> > you're having is indeed caused by the case of the header names. Just to
> > make sure you're not barking at the wrong tree.
> > If the receiving party is really relying on the case of header names,
> > I'd ask them to fix their broken code.
> 
> Maybe better "definitely" :)
> 
> If I send the headers with the proper capitalisation I get through, otherwise 
> I am getting an error I wouldnt send the header. Unfortunately this is one of 
> the situations where you cant ask the other parties to correct their code, 
> but have to adapt by yourself ;).
> 
> Alexander
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

_________________________________________________________________
Insert movie times and more without leaving Hotmail®. 
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009

Reply via email to