On Wed, 23 Jan 2002, Marx, Mitchell E (Mitch), ALCNS wrote:

> Date: Wed, 23 Jan 2002 15:11:12 -0500
> From: "Marx, Mitchell E (Mitch), ALCNS" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: having to use HttpServletResponse.setContentType
>
>
> Configuration: Solaris 2.6, Apache 1.3.20, mod_jk 3.3, Tomcat 3.2.3
>
> In migrating an application from JavaWebServer/WebLogic, it seems that
> servlets that extend from HttpServlet need to have
>
>       setContentType("text/html");
>
> when running under Tomcat, but did not under the previous web servers.
> Otherwise, they are served as "text/plain" and Netscape 4.76 shows the
> HTML as text, instead of rendered HTML.
>
> Is this a feature or a misconfiguration on my part?
>

Many older servlet containers did indeed assume a content type of
"text/html" when the application omitted one, but the behavior was never
defined in the spec until Servlet 2.3, where the container is explicitly
prohibited from setting a default content type (Section 5.2).  Thus, it is
unfortunate but not surprising to see variation in older containers.

> Mitchell Evan Marx        [EMAIL PROTECTED]
> AT&T IP Network Configuration & Provisioning Development
>

Craig


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to