You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by mi...@student.uhasselt.be on 2005/08/11 16:44:02 UTC

adding mime-type

Hello,

I have added a mimetype for the crt-extension to the
$CATALINA_HOME/conf/web.xml-file. I have a file with this extension in the
ROOT-webapp-directory. The ROOT-webapp has no web.xml-file. I also restarted
tomcat. However, when I open the crt-file, it is still presented as a
text-file. Any idea why this is? Am I doing something wrong? Do I need to do
additional steps? I'm using tomcat 5.5.9.

greetings and thanks,

Michel Brabants



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


Re: adding mime-type

Posted by Brian Cook <bc...@printtime.com>.
If you are calling it though a servlet I believe you will still need the 
  set the MIME type in the HttpResponse object with a call like

response.setContentType("text/html");

I am not sure how you would do it for a JSP page.  Unless you just went 
for the inelegant option of

<%  response.setContentType("text/html");   %>

You would clearly need to replace "text/html" with the MIME type you set 
up already.


michel.brabants@student.uhasselt.be wrote:
> Hello,
> 
> I have added a mimetype for the crt-extension to the
> $CATALINA_HOME/conf/web.xml-file. I have a file with this extension in the
> ROOT-webapp-directory. The ROOT-webapp has no web.xml-file. I also restarted
> tomcat. However, when I open the crt-file, it is still presented as a
> text-file. Any idea why this is? Am I doing something wrong? Do I need to do
> additional steps? I'm using tomcat 5.5.9.
> 
> greetings and thanks,
> 
> Michel Brabants
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


-- 
Brian Cook
Digital Services Analyst
Print Time Inc.
bcook@printtime.com
913.345.8900


Re: adding mime-type

Posted by mi...@student.uhasselt.be.
Hello,

I checked it on an other computer yesterday en there it was shown as the
intended type (x509-certificate). I used konqueror. Konqueror still tells me it
is plain text. However, firefox shows it as a certificate. I tested konqueror on
other sites and there is shows the file as a certificate.

If someone would want to test it: The certificate is located at the following
url:
http://bib12.uhasselt.be/

greetings,

Michel


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


Re: adding mime-type

Posted by Charles Meier <cm...@peerpro.net>.
What client browser are you using.  MS IE can ignore the mime-type presented
by the server and make decisions based on its own voodoo.  See:

http://www.spartanicus.utvinternet.ie/file_extensions_and_mime_types_on_the_web.htm
http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/BookofSP1/e5a730ee-a68b-4789-8419-4de4c3c7950d.mspx

michel.brabants@student.uhasselt.be wrote:

>Hello,
>
>I have added a mimetype for the crt-extension to the
>$CATALINA_HOME/conf/web.xml-file. I have a file with this extension in the
>ROOT-webapp-directory. The ROOT-webapp has no web.xml-file. I also restarted
>tomcat. However, when I open the crt-file, it is still presented as a
>text-file. Any idea why this is? Am I doing something wrong? Do I need to do
>additional steps? I'm using tomcat 5.5.9.
>
>greetings and thanks,
>
>Michel Brabants
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>  
>



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