hi,
As much as i remember relative redirects are not correct in a strict
Grab the latest Cocoon from CVS, and launch "build run".
Then point the browser to http://localhost:8888/
The redirect doesn't work it seems...
Then point to http://localhost:8888/samples/
It should redirect to http://localhost:8888/samples/welcome but instead it redirects to http://localhost:8888/welcome (one step back)
Then goto http://localhost:8888/samples/misc
It redirects to http://localhost:8888/samples/welcome
Now, if I put a / in front of the redirect url (should be relative to servlet context, no?) it seems to work.
There is something wrong with the redirection-resolving, but honestly I don't know if the problem is in Tomcat, that makes it all work, Cocoon or Jetty.
What is the correct behaviour?
sense, the servlet rfc spec say that redirects should be always absolut.
Weblogic and probably tomcat are relaxing this converting relative redirectURLs to absolute urls.
anyway a trace first jetty, next tomcat
jetty redirects for /samples/ to location /welcome
tomcat redirects for /cocoon2-local/samples/ to location /cocoon2-local/samples/welcome
I think the most correct way is to fix Cocoon sending only absolute redirect URLs
any comments ?
bye bernhard
<jetty>
------ localhost:1499->localhost:8888 ------
GET /samples/ HTTP/1.1
Host: localhost:8079
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2) Gecko/20021126
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1
Accept-Language: en-us, en;q=0.50
Accept-Encoding: gzip, deflate, compress;q=0.9
Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
Keep-Alive: 300
Connection: keep-alive
------ localhost:8888->localhost:1499 ------
HTTP/1.1 302 Moved Temporarily
Date: Fri, 6 Dec 2002 20:45:56 GMT
Server: Jetty/4.1.2 (Windows 2000 5.0 x86)
Servlet-Engine: Jetty/4.1.2 (Servlet 2.3; JSP 1.2; java 1.4.1)
X-Cocoon-Version: 2.1-dev
Location: http://localhost:8079/welcome
Transfer-Encoding: chunked
</jetty>
<tomcat>
------ localhost:1507->localhost:8080 ------
GET /cocoon2-local/samples/ HTTP/1.1
Host: localhost:8079
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2) Gecko/20021126
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1
Accept-Language: en-us, en;q=0.50
Accept-Encoding: gzip, deflate, compress;q=0.9
Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
Keep-Alive: 300
Connection: keep-alive
------ localhost:8080->localhost:1507 ------
HTTP/1.1 302 Moved Temporarily
X-Cocoon-Version: 2.1-dev
Location: http://localhost:8079/cocoon2-local/samples/welcome
Content-Type: text/html;charset=ISO-8859-1
Content-Language: de-AT
Transfer-Encoding: chunked
Date: Fri, 06 Dec 2002 20:51:31 GMT
Server: Apache Coyote/1.0
2b0
<html><head><title>Apache Tomcat/4.1.12 - Error report</title><STYLE><!--H1{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} H3{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} BODY{font-family : sans-serif,Arial,Tahoma;color : black;background-color : white;} B{color : white;background-color : #0086b2;} HR{color : #0086b2;} --></STYLE> </head><body><h1>HTTP Status 302 - </h1><HR size="1" noshade><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The requested resource () has moved temporarily to a new location.</u></p><HR size="1" noshade><h3>Apache Tomcat/4.1.12</h3></body></html>
0
</tomcat>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]