You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Reynir Hübner <re...@hugsmidjan.is> on 2003/05/28 19:57:42 UTC

Content type problem

Hi, 
I have a content-type problem...

I have a website where most urls are not with an file ending such as .jsp that is most urls are something like this  : 

http://website.com/news 
http://website.com/staff
http://website.com/news/12/05/2003

This is done by urlrewriting with a filter. 

The problem I am trying to solve is the fact that the default mime type seems to be text-plain, and there for all those pages get rendered as text but not HTML. 

I've tried setting response.setContentType("text/html"); in my JSP but that does not change anything, I also have all the content type tags in the HTML code, but that does not change anything either. 


What can I do (I am about to patch the http connector)....



Reynir Þór Hübner
reynir@hugsmidjan.is

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Content type problem

Posted by Bill Barker <wb...@wilshire.com>.
I'm guessing that you are using an rd.include(request, response), which
specifically forbids changing things like content-type.

"Reynir H�bner" <re...@hugsmidjan.is> wrote in message
news:88500E0F870AA542B6340D8BC05A9E1B1C666F@rup.hugsmidjan.is...
Hi,
I have a content-type problem...

I have a website where most urls are not with an file ending such as .jsp
that is most urls are something like this  :

http://website.com/news
http://website.com/staff
http://website.com/news/12/05/2003

This is done by urlrewriting with a filter.

The problem I am trying to solve is the fact that the default mime type
seems to be text-plain, and there for all those pages get rendered as text
but not HTML.

I've tried setting response.setContentType("text/html"); in my JSP but that
does not change anything, I also have all the content type tags in the HTML
code, but that does not change anything either.


What can I do (I am about to patch the http connector)....



Reynir ��r H�bner
reynir@hugsmidjan.is




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org