You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Reinhard Poetz <re...@apache.org> on 2003/08/31 18:07:05 UTC

FW: HTML code shown in browser, not parsed

It seems this is the same problem as the sendPage() problem described
recently on both lists because AFAIK sendPage(..) calls are internal
redirects.

Is anybody aware of any changes (environment, ...?) that could have
caused this problem?

Cheers,
Reinhard


> -----Original Message-----
> From: Sonny Sukumar [mailto:ahimsadesi@hotmail.com] 
> Sent: Sunday, August 31, 2003 12:43 AM
> To: users@cocoon.apache.org
> Subject: HTML code shown in browser, not parsed
> 
> 
> 
> Hi guys,
> 
> I just noticed this strange behavior today..
> 
> When I do an internal redirect to a trivially simple pipeline 
> that just does 
> a map:read to read an HTML document, then the actual HTML 
> code for that doc 
> is shown in my browser.  Here's an example sitemap snippet:
> 
> <map:match pattern="doSomething">
>   <!-- Do some things -->
>   <map:redirect-to uri="cocoon:/readStaticHtmlDoc"/> <map:match>
> 
> <map:match pattern="readStaticHtmlDoc">
>   <map:read src="myapp/html_files/someFile.htm"/>
> </map:match>
> 
> Note that invoking "readStaticHtmlDoc" works just fine.  Can 
> anybody explain 
> this?
> 
> I upgraded to Cocoon 2.1.1-dev yesterday, and I'm on Tomcat 
> 4.1.17 with JDK 
> 1.4.2_01.  I think it has to be a Cocoon-related thing 
> though, whether my 
> fault or a bug.  It's probably my fault somehow, but it's 
> never happened 
> before.
> 
> Thanks,
> 
> Sonny
> 
> _________________________________________________________________
> MSN 8: Get 6 months for $9.95/month 
> http://join.msn.com/?page=dept/dialup
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 


Re: HTML code shown in browser, not parsed

Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Sylvain Wallez wrote:

> Reinhard Poetz wrote:
>
>> It seems this is the same problem as the sendPage() problem described 
>> recently on both lists because AFAIK sendPage(..) calls are internal 
>> redirects.
>>
>> Is anybody aware of any changes (environment, ...?) that could have 
>> caused this problem?
>
>
> I fixed bugs in internal redirects about two weeks ago, but I don't 
> see how this can affect the mime type. Also, sendPageAndWait() also 
> uses an internal redirect.
>
> I will investigate further on this... 


Found and fixed (in the CVS).

The content type was not set in the case of internal redirects, leaving 
it to browser decision, mainly based upon file extension. In my case, I 
always use ".html" which displays well, whereas other unknown extensions 
appear to be rendered as text.

All should be ok now.

Sylvain

>>> -----Original Message-----
>>> From: Sonny Sukumar [mailto:ahimsadesi@hotmail.com] Sent: Sunday, 
>>> August 31, 2003 12:43 AM
>>> To: users@cocoon.apache.org
>>> Subject: HTML code shown in browser, not parsed
>>>
>>> Hi guys,
>>>
>>> I just noticed this strange behavior today..
>>>
>>> When I do an internal redirect to a trivially simple pipeline that 
>>> just does a map:read to read an HTML document, then the actual HTML 
>>> code for that doc is shown in my browser.  Here's an example sitemap 
>>> snippet:
>>>
>>> <map:match pattern="doSomething">
>>>  <!-- Do some things -->
>>>  <map:redirect-to uri="cocoon:/readStaticHtmlDoc"/> <map:match>
>>>
>>> <map:match pattern="readStaticHtmlDoc">
>>>  <map:read src="myapp/html_files/someFile.htm"/>
>>> </map:match>
>>>
>>> Note that invoking "readStaticHtmlDoc" works just fine.  Can anybody 
>>> explain this?
>>>
>>> I upgraded to Cocoon 2.1.1-dev yesterday, and I'm on Tomcat 4.1.17 
>>> with JDK 1.4.2_01.  I think it has to be a Cocoon-related thing 
>>> though, whether my fault or a bug.  It's probably my fault somehow, 
>>> but it's never happened before. 
>>

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com



Re: HTML code shown in browser, not parsed

Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Sylvain Wallez wrote:

> Reinhard Poetz wrote:
>
>> It seems this is the same problem as the sendPage() problem described 
>> recently on both lists because AFAIK sendPage(..) calls are internal 
>> redirects.
>>
>> Is anybody aware of any changes (environment, ...?) that could have 
>> caused this problem?
>
>
> I fixed bugs in internal redirects about two weeks ago, but I don't 
> see how this can affect the mime type. Also, sendPageAndWait() also 
> uses an internal redirect.
>
> I will investigate further on this... 


Found and fixed (in the CVS).

The content type was not set in the case of internal redirects, leaving 
it to browser decision, mainly based upon file extension. In my case, I 
always use ".html" which displays well, whereas other unknown extensions 
appear to be rendered as text.

All should be ok now.

Sylvain

>>> -----Original Message-----
>>> From: Sonny Sukumar [mailto:ahimsadesi@hotmail.com] Sent: Sunday, 
>>> August 31, 2003 12:43 AM
>>> To: users@cocoon.apache.org
>>> Subject: HTML code shown in browser, not parsed
>>>
>>> Hi guys,
>>>
>>> I just noticed this strange behavior today..
>>>
>>> When I do an internal redirect to a trivially simple pipeline that 
>>> just does a map:read to read an HTML document, then the actual HTML 
>>> code for that doc is shown in my browser.  Here's an example sitemap 
>>> snippet:
>>>
>>> <map:match pattern="doSomething">
>>>  <!-- Do some things -->
>>>  <map:redirect-to uri="cocoon:/readStaticHtmlDoc"/> <map:match>
>>>
>>> <map:match pattern="readStaticHtmlDoc">
>>>  <map:read src="myapp/html_files/someFile.htm"/>
>>> </map:match>
>>>
>>> Note that invoking "readStaticHtmlDoc" works just fine.  Can anybody 
>>> explain this?
>>>
>>> I upgraded to Cocoon 2.1.1-dev yesterday, and I'm on Tomcat 4.1.17 
>>> with JDK 1.4.2_01.  I think it has to be a Cocoon-related thing 
>>> though, whether my fault or a bug.  It's probably my fault somehow, 
>>> but it's never happened before. 
>>

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com



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


Re: FW: HTML code shown in browser, not parsed

Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Reinhard Poetz wrote:

>It seems this is the same problem as the sendPage() problem described
>recently on both lists because AFAIK sendPage(..) calls are internal
>redirects.
>
>Is anybody aware of any changes (environment, ...?) that could have
>caused this problem?
>  
>

I recently fixed bugs in internal redirects more about two weeks ago, 
but I don't see how this can affect the mime type. Also, 
sendPageAndWait() also uses an internal redirect.

I will investigate further on this...

Sylvain

>>-----Original Message-----
>>From: Sonny Sukumar [mailto:ahimsadesi@hotmail.com] 
>>Sent: Sunday, August 31, 2003 12:43 AM
>>To: users@cocoon.apache.org
>>Subject: HTML code shown in browser, not parsed
>>
>>
>>
>>Hi guys,
>>
>>I just noticed this strange behavior today..
>>
>>When I do an internal redirect to a trivially simple pipeline 
>>that just does 
>>a map:read to read an HTML document, then the actual HTML 
>>code for that doc 
>>is shown in my browser.  Here's an example sitemap snippet:
>>
>><map:match pattern="doSomething">
>>  <!-- Do some things -->
>>  <map:redirect-to uri="cocoon:/readStaticHtmlDoc"/> <map:match>
>>
>><map:match pattern="readStaticHtmlDoc">
>>  <map:read src="myapp/html_files/someFile.htm"/>
>></map:match>
>>
>>Note that invoking "readStaticHtmlDoc" works just fine.  Can 
>>anybody explain 
>>this?
>>
>>I upgraded to Cocoon 2.1.1-dev yesterday, and I'm on Tomcat 
>>4.1.17 with JDK 
>>1.4.2_01.  I think it has to be a Cocoon-related thing 
>>though, whether my 
>>fault or a bug.  It's probably my fault somehow, but it's 
>>never happened 
>>before.
>>
>>Thanks,
>>
>>Sonny
>>
>>_________________________________________________________________
>>MSN 8: Get 6 months for $9.95/month 
>>http://join.msn.com/?page=dept/dialup
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>    
>>
>
>  
>


-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com