cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz TaƄczyk <golia...@polzone.pl>
Subject 301 Redirect using Cocoon 2.1.6
Date Thu, 11 Aug 2005 17:15:57 GMT
Hello,

This code makes redirect:
      <xsp:logic>
        HttpServletResponse httpResponse =        
(HttpServletResponse)this.objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT);       
        httpResponse.addHeader("Location", "/blablabla.html");
        httpResponse.setStatus(301);
      </xsp:logic>

And this generates correct page with correct status code and location
header. Browser redirects to /blablabla.html, and then I see
blablabla.html(generate with Cocoon 2.1.6), but it starts with:
//==start==
e4<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="/blalbabla.html">here</a>.</p>
</body></html>

0

HTTP/1.1 200 OK
Date: Thu, 11 Aug 2005 11:59:53 GMT
Server: Apache-Coyote/1.1
X-Cocoon-Version: 2.1.6
Content-Type: text/html
Transfer-Encoding: chunked

1e99
//==end==

On Tomcat 4.1 everything works fine, but when I switch to Tomcat
5.5(which I use on production environment) I see such strange things.

How to fix it?

-- 
Best regards,
 Grzegorz                          mailto:goliatus@polzone.pl


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message