tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: problems with mod_jk modifying headers
Date Wed, 04 Jul 2007 00:24:28 GMT

"Anton Melser" <melser.anton@gmail.com> wrote in message 
news:92d3a4950707020709p6dbc7b51md505ac0137b86199@mail.gmail.com...
> (maybe a repost?)
> Hi all,
> We are running tomcat 5.5.23 on java 1.6.0 (suse 10.0 with addon java6
> rpms for suse 10.1). These machines are load balanced behind an apache
> 2.2.2 with mod_jk jakarta-tomcat-connectors-1.2.15 (both compiled from
> sources). We have a page that is showing the html source instead of
> the page on firefox2. The funny thing is that when the page is
> accessed directly then the content type is text/html (and the page
> shows correctly) but when coming through mod_jk, it is coming as
> text/plain (and showing the source). This doesn't seem to bother
> IE7...
> Does anyone have any ideas?

Well, the default content-type for httpd is text/plain, so if you have a 
controller servlet something like:

   protected void doGet(HttpServletRequest req, HttpServletResponse res)
     throws ServletException, IOException {
        req.setAttribute("myBean", myBean);
        RequestDispatcher rd = 
getServletContext().getRequestDispatcher("/WEB-INF/jsps/display.jsp");
        rd.include(req, res);
    }

Then the JSP page will not be able to add it's content-type header, so httpd 
will add it's default content-type header when the response is sent back.

> Cheers
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message