Re: adding mime-type

2005-08-12 Thread michel . brabants
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



adding mime-type

2005-08-11 Thread michel . brabants
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: adding mime-type

2005-08-11 Thread Brian Cook


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.



[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Brian Cook
Digital Services Analyst
Print Time Inc.
[EMAIL PROTECTED]
913.345.8900

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: adding mime-type

2005-08-11 Thread Charles Meier


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

[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



CSS mime-type vs Netscape 7 and Firefox 1

2005-02-05 Thread Mieke Banderas
I have added the mime-type for css in Tomcat 3s conf/web.xml file  as so:
mime-mapping
extensioncss/extension
mime-typetext/css/mime-type
 /mime-mapping

using the same format as the rest of the file and as TOmcat 4. Yet the
server serves the linked css files as text/plain. Why? What can I do
about this. 
The page only breaks in Netscape 7 (6 also I presume) and Firefox, but FF
is a target broswer for my project.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Changing the Default Mime Type

2005-02-02 Thread Scott Wilson
The quick version:
Is it possible to change the default MIME type on a Tomcat 4.1 server? 
Currently files with unknown extensions are treated as text/plain.


More background:
I run a server that runs a Tomcat that is provided by an App Vendor.  With 
their last upgrade they upgrade the Tomcat to 4.1.  Before then files with 
unknown extensions would attempt to download by default.  (Presumably the 
default MIME type was application/unknown.)  Now, it attempts to show 
the files as text, with the MIME type text/plain.

I know how to change MIME type for a particular extension, but what I'd 
really like to do is to change the default used for unknown extensions. 
Is this possible without editing the source and recompiling?

I did notice the change listed in the RELEASE-NOTES-4.1.txt file.  Under
Catalina Bug Fixes:
[4.1.11] DefaultServlet:
   Assume text file when MIME type is unknown for including purposes.
Is their some setting that can undo this fix?  Considerable searching on 
this has proven fruitless so far.  Does Tomcat have any configuration 
setting comparable to Apache's DefaultType?

Thanks,
Scott WilsonLead System Administrator
[EMAIL PROTECTED]NSIT - DCS - ATAT
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Mime type not set for welcome files

2004-12-01 Thread Jerome Louvel
I forgot to mention that the issue described below is occuring with 
Tomcat 5.5.3
Any help would be appreciated!

Jerome
Jerome Louvel wrote:
I have a web app with the following configuration:
   mime-mapping
   extensionxhtml/extension
   mime-typeapplication/xhtml+xml/mime-type
   /mime-mapping
   welcome-file-list
   welcome-fileindex.xhtml/welcome-file
   /welcome-file-list
When I request http://myserver/index.xhtml I receive the XHTML web 
page normally. However, if I request http://myserver/ I receive the 
file without the correct mime-type set, which opens an Open with/Save 
as... dialog in the browser.

It seems that the welcome-file-list is ignoring the mime-mapping 
set in the configuration. Is this as designed, a configuration issue 
or a bug?

Thanks,
Jerome


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Mime type not set for welcome files

2004-11-30 Thread Jerome Louvel
I have a web app with the following configuration:
   mime-mapping
   extensionxhtml/extension
   mime-typeapplication/xhtml+xml/mime-type
   /mime-mapping
   welcome-file-list
   welcome-fileindex.xhtml/welcome-file
   /welcome-file-list
When I request http://myserver/index.xhtml I receive the XHTML web page
normally. However, if I request http://myserver/ I receive the file
without the correct mime-type set, which opens an Open with/Save as...
dialog in the browser.
It seems that the welcome-file-list is ignoring the mime-mapping set
in the configuration. Is this as designed, a configuration issue or a bug?
Thanks,
Jerome

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


video/x-ms-wmv mime-type added for wmv files, but doesn't seem to work

2004-05-26 Thread Patrick Willart
Hello,

I've added the following to my conf/web.xml but it looks like Tomcat
(5.0.18) isn't picking this up. It's serving the file as a plain text file.
I've tried adding the mime-mapping to my applications web.xml but also
without result.

mime-mapping
extensionwmv/extension
mime-typevideo/x-ms-wmv/mime-type
/mime-mapping

I have added mime-mappings before and those seem to work. Does anybody have
an idea what's wrong?

Thanks,

Patrick


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: video/x-ms-wmv mime-type added for wmv files, but doesn't seem to work

2004-05-26 Thread Jeanfrancois Arcand

Patrick Willart wrote:
Hello,
I've added the following to my conf/web.xml but it looks like Tomcat
(5.0.18) isn't picking this up. It's serving the file as a plain text file.
I've tried adding the mime-mapping to my applications web.xml but also
without result.
   mime-mapping
   extensionwmv/extension
   mime-typevideo/x-ms-wmv/mime-type
   /mime-mapping
I have added mime-mappings before and those seem to work. Does anybody have
an idea what's wrong?
 

Any exceptions visible? Open server.xml, search for xmlValidation and 
xmlNamespaceAware. But both value set to true. Restart Tomcat. Is the 
web.xml well parsed?

-- Jeanfrancois

Thanks,
Patrick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: video/x-ms-wmv mime-type added for wmv files, but doesn't seem to work

2004-05-26 Thread Patrick Willart
Thanks for your response Jeanfrancois,

It appeared just to be my now version of Internet Explorer acting up.

My manager actually changed his mind a few minutes later and wanted that our
users always download the file before viewing it. It makes some sense
because the videos are over an hour long.

To do this I change the mime-type to application/octet-stream. This works
fine for Netscape (i.e. Save As dialog appears), but Internet Explorer just
doesn't care and opens media player (grrr). I know this is an IE issue
and this also happens with some other mime-types.

I guess I develop a servlet and serve the file to the user via that servlet.
Then I can add the Content-disposition header so that it downloads as a
file.

i.e. response.setHeader(Content-disposition, attachment;
filename=mediafile.wmv);


Thanks,

Patrick

-Original Message-
From: Jeanfrancois Arcand [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 26, 2004 12:23 PM
To: Tomcat Users List
Subject: Re: video/x-ms-wmv mime-type added for wmv files, but doesn't
seem to work




Patrick Willart wrote:

Hello,

I've added the following to my conf/web.xml but it looks like Tomcat
(5.0.18) isn't picking this up. It's serving the file as a plain text file.
I've tried adding the mime-mapping to my applications web.xml but also
without result.

mime-mapping
extensionwmv/extension
mime-typevideo/x-ms-wmv/mime-type
/mime-mapping

I have added mime-mappings before and those seem to work. Does anybody have
an idea what's wrong?


Any exceptions visible? Open server.xml, search for xmlValidation and
xmlNamespaceAware. But both value set to true. Restart Tomcat. Is the
web.xml well parsed?

-- Jeanfrancois


Thanks,

Patrick


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



default mime type for tomcat 5

2004-03-03 Thread Nathan Maves
I have some plain text files that are formated but when tomcat 5 serves 
the pages it loses all formating.  This only happens on older browser 
such as netscape 4.79.

I assume that tomcat sets the default mime type to text/html but I need 
it to be text/plain.

Nathan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


MIME type

2004-02-19 Thread Jaster, Bob
I would like to configure Tomcat to return a specific MIME type for all
files that end with a JNLP extension.  Could anyone tell me how to do this?

Bob Jaster 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: MIME type

2004-02-19 Thread Juan de Bravo
you can do it in %CATALINA_HOME%\conf\web.xml file. It's a file descriptor
for every web applications:

mime-mapping
extensionJNLP/extension
mime-typeXXX/Y/mime-type
/mime-mapping

-Mensaje original-
De: Jaster, Bob [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 19 de febrero de 2004 17:33
Para: '[EMAIL PROTECTED]'
Asunto: MIME type


I would like to configure Tomcat to return a specific MIME type for all
files that end with a JNLP extension.  Could anyone tell me how to do this?

Bob Jaster

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mime type for authorware content

2003-12-19 Thread Jon Wingfield
http://filext.com/detaillist.php?extdetail=AAS

Sarel Bester wrote:

Hi all

I have 2 Tomcat servers - v3.3 and v4.1.27 - (on Windows  and IIS) which
host a webapp that plays Macromedia Authorware content.  The content doesn't
play through Tomcat.  I suspect it is because of MIME type that is not
defined.  I searched through mailing list AND archives and can't find
anything on authorware.  I did find the MIME type definition for Excel:) . .
.
mime-mapping
 extensionxls/extension
 mime-typeapplication/vnd.ms-excel/mime-type
/mime-mapping
Can anybody help me with the appropriate entry for Authorware content?  The
relevant extensions are .aam and .aas.
Thanks

Sarel



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Mime type for authorware content

2003-12-18 Thread Sarel Bester
Hi all

I have 2 Tomcat servers - v3.3 and v4.1.27 - (on Windows  and IIS) which
host a webapp that plays Macromedia Authorware content.  The content doesn't
play through Tomcat.  I suspect it is because of MIME type that is not
defined.  I searched through mailing list AND archives and can't find
anything on authorware.  I did find the MIME type definition for Excel:) . .
.
mime-mapping
 extensionxls/extension
 mime-typeapplication/vnd.ms-excel/mime-type
/mime-mapping

Can anybody help me with the appropriate entry for Authorware content?  The
relevant extensions are .aam and .aas.

Thanks

Sarel



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/html

2003-11-27 Thread Stuart Stephen
Hi,

I'm getting the following error when sending HTML emails. From looking
around the web it appears that my error could be from my mailcap file not
being configured correctly, or the include order of mail.jar and
activation.jar. How can I find out in which order Tomcat includes jars?

Has anyone encountered these errors before and know a fix?

Thanks
Stuart

javax.mail.MessagingException: IOException while sending message;
  nested exception is:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type
text/html (844 chars)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:353)
at com.t2ut.email.Email.sendMessage(Email.java:246)
at com.t2ut.email.Email.sendMail(Email.java:50)
at
org.apache.jsp.tcr_update_list_jsp._jspService(tcr_update_list_jsp.java:157)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
10)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:575)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:498)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8
22)
at org.apache.jsp.tcr_view_jsp._jspService(tcr_view_jsp.java:76)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
10)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:575)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:498)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8
22)
at org.apache.jsp.tcr_jsp._jspService(tcr_jsp.java:98)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
10)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509

RE: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/html

2003-11-27 Thread Stuart Stephen
Hi,

Ever since trying to attach files to HTML e-mails I have had this problem.

I've just checked my mailcap file and this seems fine to me??? Or at least
it is according to http://www.jguru.com/faq/view.jsp?EID=237257. The
contents of my mailcap file is below.

---
#
# @(#)mailcap   1.5 00/09/26
#
# Default mailcap file for the JavaMail System.
#
# JavaMail content-handlers:
#
text/plain;;x-java-content-handler=com.sun.mail.handlers.text_plain
text/html;; x-java-content-handler=com.sun.mail.handlers.text_html
text/xml;;  x-java-content-handler=com.sun.mail.handlers.text_xml
multipart/*;;   x-java-content-handler=com.sun.mail.handlers.multipart_mixed
message/rfc822;;x-java-content-handler=com.sun.mail.handlers.message_rfc822

---
My email sending code is below:

  private static boolean sendMessage(String[] to, String subject, String
message, String from, String[] filelocation) {
try {
  String recievers = StringWizard.arrayToText(to, , );
  ContentType ct = new ContentType(text/plain, iso-8859-1, new
ParameterList());
  StringBuffer msg = new StringBuffer(message);

  Properties prop = new Properties();
  prop.put(mail.smtp.auth, true);
  prop.put(mail.transport.protocol, smtp);
  prop.put(mail.smtp.host, MAIL_HOST);

  Session mail_Session=Session.getInstance(prop, null);
  InternetAddress fromAddress = new InternetAddress(from);
  InternetAddress toAddress[] = new InternetAddress[to.length];

  for(int i=0;ito.length;i++) toAddress[i] = new
InternetAddress(to[i]);

  InternetAddress[] reply = { fromAddress };

  MimeMessage myMessage = new MimeMessage(mail_Session);
  myMessage.setFrom(fromAddress);
  myMessage.setReplyTo(reply);

  for(int i=0;ito.length;i++)
myMessage.addRecipient(Message.RecipientType.TO, toAddress[i]);

  myMessage.setSentDate(new java.util.Date());
  myMessage.setSubject(subject);

  Multipart mp = new MimeMultipart();

  // add default stuff (text).
  // add text.
  MimeBodyPart textpart = new MimeBodyPart();
  textpart.setText(msg.toString());
  mp.addBodyPart(textpart);

  // add html.
  boolean sendHTML = UserHelper.HTMLEmails(to[0]);
  if(sendHTML) {
MimeBodyPart htmlpart = new MimeBodyPart();

htmlpart.setContent(StringWizard.stripJavascript(StringWizard.toHTML(msg.toS
tring())), text/html +  ( + msg.length() +  chars));
mp.addBodyPart(htmlpart);
  }

  // if we are sending any files with this email add them.
  boolean attached = false;
  if(filelocation!=null  filelocation.length0) {
for(int i=0;ifilelocation.length;i++) {
  File attachment = new File(filelocation[i]);
  if(attachment.exists()  attachment.isFile() 
attachment.canRead()) {
System.err.println(Email.sendMessage() : Attaching file  +
attachment.getAbsolutePath() +  to email bound for  + recievers);
MimeBodyPart attachfile = new MimeBodyPart();
FileDataSource fds = new FileDataSource(attachment);
DataHandler dh = new DataHandler(fds);
attachfile.setFileName(attachment.getName());
attachfile.setDisposition(Part.ATTACHMENT);
attachfile.setDescription(Attached File:  +
attachment.getName());
attachfile.setDataHandler(dh);
mp.addBodyPart(attachfile);
attached = true;
  }
}
  }

  if(attached==false  !sendHTML)myMessage =
addMessageHeaders(myMessage, ct);
  myMessage.setContent(mp);

  Transport tr = mail_Session.getTransport(smtp);
  tr.connect(MAIL_HOST, USERNAME, PASSWORD);

  myMessage.saveChanges();

  tr.sendMessage(myMessage, toAddress);
  tr.close();
  return true;
}
catch(Exception e){
  e.printStackTrace(System.err);
  return false;
}
  }

-Original Message-
From: Stuart Stephen [mailto:[EMAIL PROTECTED]
Sent: 27 November 2003 16:47
To: [EMAIL PROTECTED]
Subject: javax.activation.UnsupportedDataTypeException: no object DCH
for MIME type text/html


Hi,

I'm getting the following error when sending HTML emails. From looking
around the web it appears that my error could be from my mailcap file not
being configured correctly, or the include order of mail.jar and
activation.jar. How can I find out in which order Tomcat includes jars?

Has anyone encountered these errors before and know a fix?

Thanks
Stuart

javax.mail.MessagingException: IOException while sending message;
  nested exception is:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type
text/html (844 chars)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:353)
at com.t2ut.email.Email.sendMessage(Email.java:246)
at com.t2ut.email.Email.sendMail(Email.java:50)
at
org.apache.jsp.tcr_update_list_jsp

Tomcat 4.1 MIME Type from web.xml

2003-09-16 Thread Lukas Bradley
In Tomcat 5.0 beta, there is a class MimeMap offering the following method:
public String getContentType(String extn) {...}

Is there a corresponding method within the Tomcat 4.1 framework?  I would
like to determine a file's MIME type as specified within the web.xml
document.

Thanks

Lukas






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 4.1 MIME Type from web.xml

2003-09-16 Thread Lukas Bradley

 Is there a corresponding method within the Tomcat 4.1 framework?  I would
 like to determine a file's MIME type as specified within the web.xml
 document.

I'm an idiot, please don't bombard me


Servlet Context
  java.lang.String getMimeType(java.lang.String file)
Returns the MIME type of the specified file, or null if the
MIME type is not known.


Lukas




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Mime Type Header errors!

2003-06-19 Thread EPugh
Hi,

I just moved my Turbine application from one server to another.  The new one
has jdk1.4.1 and tomcat 4.1.24.  My users are complaining of clicking links,
and getting back a page not found error.  If they refresh, then it does
hit the page.  I looked into the logs, and found these errors:


stderr.log:
INFO: Jk running ID=0 time=0/141  config=c:\java\tomcat\conf\jk2.properties
java.lang.NullPointerException
java.lang.NullPointerException
at
org.apache.tomcat.util.http.MimeHeaders.getName(MimeHeaders.java:204)
at
org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.jav
a:1211)
at
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:660)
at org.apache.coyote.Response.action(Response.java:220)
at
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.j
ava:516)
at org.apache.coyote.Response.doWrite(Response.java:524)
at
org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:384)
at
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439)
at
org.apache.coyote.tomcat4.OutputBuffer.flush(OutputBuffer.java:345)
at
org.apache.coyote.tomcat4.CoyoteWriter.flush(CoyoteWriter.java:119)
at
com.upstate.services.scheduler.JobFiringServlet.doGet(JobFiringServlet.java:
179)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
at java.lang.Thread.run(Thread.java:536)
Jun 19, 2003 10:29:30 AM org.apache.coyote.http11.Http11Processor process
SEVERE: Error finishing response
java.lang.NullPointerException
at
org.apache.tomcat.util.http.MimeHeaders.getValue(MimeHeaders.java:323)
at
org.apache.tomcat.util.http.MimeHeaders.setValue(MimeHeaders.java:306)
at
org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.jav
a:1151)
at
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:660)
at org.apache.coyote.Response.action(Response.java:220)
at
org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOutputBuffe
r.java:371)
at

MIME type

2003-03-11 Thread Bányai András Gábor
Hello,

Everybody could help me?

I use Tomcat 4.0. 

I want to download some simple file from server. When I click in
simple.dot file the system downloads and starts MS Word. Then I click
simple2.dot and I see a binary file in the screen. 

What's error?

Please HELP!

-- 
   dv./MfG/Regards/Salutations
   Bnyai Andrs Gbor

   [EMAIL PROTECTED]
   Bosch Rexroth Kft.
   The Drive and Control Company
   H-3300 Eger, Pf.262, Berva-vlgy
   Tel: +36(36) 531-622
   Fax: +36(36) 425-117
   www.boschrexroth.hu




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [connector] bad mime type?

2003-03-09 Thread J Aaron Farr
On Sat, 2003-03-08 at 21:24, J Aaron Farr wrote:
 Hello.
 
 I've checked the archives and done several google searches all to no avail, so
 if someone could point this out to me, I'd be very grateful:
 
 Environment:
RedHat 8.0
Apache 2.0.4
JBoss 3.0 + Tomcat 4.1.18
Using coyote connector
 
 The connector seems to be working, but the responses are all in plain text. 
 So, for example, when I browse http://myserver.com/[web-app]/index.jsp I get
 the HTML source, not the rendered HTML. I tried adding a jsp mime type to
 return text/html for 'jsp' and that worked.  So it seems like somewhere,
 somehow I've got something misconfigured since I shouldn't have to create that
 mime type, correct?  Furthermore, servlets which I cannot easily map also just
 return plain text.  Any ideas where I could at least start looking for the
 problem because I'm lost.
 
 Thanks!
 jaaron

Hmm, seems to have fixed itself after a restart.  Sorry for the false
alarm.

-- 
  jaaron[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[connector] bad mime type?

2003-03-08 Thread J Aaron Farr
Hello.

I've checked the archives and done several google searches all to no avail, so
if someone could point this out to me, I'd be very grateful:

Environment:
   RedHat 8.0
   Apache 2.0.4
   JBoss 3.0 + Tomcat 4.1.18
   Using coyote connector

The connector seems to be working, but the responses are all in plain text. 
So, for example, when I browse http://myserver.com/[web-app]/index.jsp I get
the HTML source, not the rendered HTML. I tried adding a jsp mime type to
return text/html for 'jsp' and that worked.  So it seems like somewhere,
somehow I've got something misconfigured since I shouldn't have to create that
mime type, correct?  Furthermore, servlets which I cannot easily map also just
return plain text.  Any ideas where I could at least start looking for the
problem because I'm lost.

Thanks!
jaaron

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Mime-Type

2003-03-03 Thread Anthony Smith
I did not know where ask to else this question.

Is there a mime-type for a jsp? If so, what is it?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mime-Type

2003-03-03 Thread Lloyd A Duke
jsp typically when compiled and executed responds with html. So I 
believe you are looking for text/html..

Anthony Smith wrote:
I did not know where ask to else this question.

Is there a mime-type for a jsp? If so, what is it?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Mime-Type

2003-03-03 Thread Shapira, Yoav

Howdy,
Typically, text/html as that's what the browser sees.

However, in a JSP (since it's really a servlet), you can set the
response content type to whatever you want, e.g. gzip or
application/ms-excel.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Anthony Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 10:36 AM
To: Tomcat Users List
Subject: Mime-Type

I did not know where ask to else this question.

Is there a mime-type for a jsp? If so, what is it?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mime-Type

2003-03-03 Thread Turner, John

JSPs are never served to a browser as JSP.  They generate output.  That
output has the appropriate MIME type, such as text/html for typical
scenarios.  Other MIME types used are image MIME types and MIME types for
things like spreadsheets, word processors, and other external applications.
If JSP source code is served to a browser with the intention of displaying
the JSP code, such as in a tutorial or HOWTO document, the MIME type would
typically be standard text.

John

 -Original Message-
 From: Anthony Smith [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 03, 2003 10:36 AM
 To: Tomcat Users List
 Subject: Mime-Type
 
 
 I did not know where ask to else this question.
 
 Is there a mime-type for a jsp? If so, what is it?
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mime-Type

2003-03-03 Thread Jon Wingfield
A compiled jsp is a servlet. The content returned from a servlet can be 
pretty much anything ;)
Most likely the returned content will be text/html

Anthony Smith wrote:

I did not know where ask to else this question.

Is there a mime-type for a jsp? If so, what is it?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Mime-Type

2003-03-03 Thread Barney Hamish
Remember to set the appropriate mime type for javascript (text/javascript)
and css (text/css) files too.

 -Original Message-
 From: Turner, John [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 03, 2003 4:45 PM
 To: 'Tomcat Users List'
 Subject: RE: Mime-Type
 
 
 
 JSPs are never served to a browser as JSP.  They generate 
 output.  That
 output has the appropriate MIME type, such as text/html for typical
 scenarios.  Other MIME types used are image MIME types and 
 MIME types for
 things like spreadsheets, word processors, and other external 
 applications.
 If JSP source code is served to a browser with the intention 
 of displaying
 the JSP code, such as in a tutorial or HOWTO document, the 
 MIME type would
 typically be standard text.
 
 John
 
  -Original Message-
  From: Anthony Smith [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 03, 2003 10:36 AM
  To: Tomcat Users List
  Subject: Mime-Type
  
  
  I did not know where ask to else this question.
  
  Is there a mime-type for a jsp? If so, what is it?
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mime-Type

2003-03-03 Thread Hostmaster of the day
Ladies and Gentleman,

.jsp (e.g. index.jsp) is indeed a MIME type.

Apache will know this MIME type by the following
code if you are using mod_jk as module:

JkMount /*.jsp ajp13

--Dave



 
 Howdy,
 Typically, text/html as that's what the browser sees.
 
 However, in a JSP (since it's really a servlet), you can set the
 response content type to whatever you want, e.g. gzip or
 application/ms-excel.
 
 Yoav Shapira
 Millennium ChemInformatics
 
 
 -Original Message-
 From: Anthony Smith [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 03, 2003 10:36 AM
 To: Tomcat Users List
 Subject: Mime-Type
 
 I did not know where ask to else this question.
 
 Is there a mime-type for a jsp? If so, what is it?
 

-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:
[EMAIL PROTECTED]
 
 
 
 
 This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an)
intended recipient, please immediately delete this e-mail from your
computer system and notify the sender.  Thank you.
 
 

-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mime-Type

2003-03-03 Thread Shapira, Yoav

Howdy,

.jsp (e.g. index.jsp) is indeed a MIME type.

Apache will know this MIME type by the following
code if you are using mod_jk as module:

JkMount /*.jsp ajp13

Do NOT confused MIME type with file extension.  The two are different.
*.jsp is an extension.  JSP is not a mime type as commonly defined.

Yoav Shapira
Millennium ChemInformatics



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mime-Type

2003-03-03 Thread Mike Jackson
Uh, mime-type doesn't have anything to do with a file extension.  If I have
a tiff image it doesn't matter what the extension is, it's still a tiff
file.  Determining mime-type based based on file extensions is a windows
stupidism.  Now, I'll admit there are certian conventions, but you can't
100% count on them.

--mikej
-=-
mike jackson
[EMAIL PROTECTED]

 -Original Message-
 From: Hostmaster of the day [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 03, 2003 8:25 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Mime-Type


 Ladies and Gentleman,

 .jsp (e.g. index.jsp) is indeed a MIME type.

 Apache will know this MIME type by the following
 code if you are using mod_jk as module:

 JkMount /*.jsp ajp13

 --Dave



 
  Howdy,
  Typically, text/html as that's what the browser sees.
 
  However, in a JSP (since it's really a servlet), you can set the
  response content type to whatever you want, e.g. gzip or
  application/ms-excel.
 
  Yoav Shapira
  Millennium ChemInformatics
 
 
  -Original Message-
  From: Anthony Smith [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 03, 2003 10:36 AM
  To: Tomcat Users List
  Subject: Mime-Type
  
  I did not know where ask to else this question.
  
  Is there a mime-type for a jsp? If so, what is it?
  
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
 
 
  This e-mail, including any attachments, is a confidential business
 communication, and may contain information that is confidential,
 proprietary and/or privileged.  This e-mail is intended only for the
 individual(s) to whom it is addressed, and may not be saved, copied,
 printed, disclosed or used by anyone else.  If you are not the(an)
 intended recipient, please immediately delete this e-mail from your
 computer system and notify the sender.  Thank you.
 
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mime-Type

2003-03-03 Thread Hostmaster of the day
Mime Type Overview

Mime types tell browsers how to handle specific extensions. Most Mime
types are set globally on the server. For example, the text/html Mime
type equates to htm, html, and shtml extensions on most servers, and
this tells your browser to interpret all files with those extensions
as HTML files. You can alter or add new Mime types specifically for
your site (note that you can not alter the global Mime type values,
only add to them). Mime types are often used to handle new
technologies as they appear. When WAP technology first appeared
no-one had these extensions set up on their server. With Mime types,
however, you could have set it up yourself and begun serving WAP
pages immediately.

Warning: Make sure you check the list of pre-existing Mime types
before adding new ones. Check with your hosting administrator before
adding a Mime type, as they can easily alter the correct functioning
of your web site.

Note: People often get confused as to the difference between Mime
types and Apache handlers. Basically, Mime types tell your browser
how to handle files, while Apache handlers tell the server how to
handle files.

JkMount /*.jsp ajp13 is an Apache handler not a MIME type. Isn't it.


 Uh, mime-type doesn't have anything to do with a file extension.
If I have
 a tiff image it doesn't matter what the extension is, it's still a
tiff
 file.  Determining mime-type based based on file extensions is a
windows
 stupidism.  Now, I'll admit there are certian conventions, but you
can't
 100% count on them.
 
 --mikej
 -=-
 mike jackson
 [EMAIL PROTECTED]
 
  -Original Message-
  From: Hostmaster of the day [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 03, 2003 8:25 AM
  To: [EMAIL PROTECTED]
  Subject: RE: Mime-Type
 
 
  Ladies and Gentleman,
 
  .jsp (e.g. index.jsp) is indeed a MIME type.
 
  Apache will know this MIME type by the following
  code if you are using mod_jk as module:
 
  JkMount /*.jsp ajp13
 
  --Dave
 
 
 
  
   Howdy,
   Typically, text/html as that's what the browser sees.
  
   However, in a JSP (since it's really a servlet), you can set the
   response content type to whatever you want, e.g. gzip or
   application/ms-excel.
  
   Yoav Shapira
   Millennium ChemInformatics
  
  
   -Original Message-
   From: Anthony Smith [mailto:[EMAIL PROTECTED]
   Sent: Monday, March 03, 2003 10:36 AM
   To: Tomcat Users List
   Subject: Mime-Type
   
   I did not know where ask to else this question.
   
   Is there a mime-type for a jsp? If so, what is it?
   
  
 
-
   To unsubscribe, e-mail:
[EMAIL PROTECTED]
   For additional commands, e-mail:
  [EMAIL PROTECTED]
  
  
  
  
   This e-mail, including any attachments, is a confidential
business
  communication, and may contain information that is confidential,
  proprietary and/or privileged.  This e-mail is intended only for
the
  individual(s) to whom it is addressed, and may not be saved,
copied,
  printed, disclosed or used by anyone else.  If you are not the(an)
  intended recipient, please immediately delete this e-mail from
your
  computer system and notify the sender.  Thank you.
  
  
  
 
-
   To unsubscribe, e-mail:
[EMAIL PROTECTED]
   For additional commands, e-mail:
[EMAIL PROTECTED]
  
 
 
 
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:
[EMAIL PROTECTED]
 
 
 
 

-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mime-Type

2003-03-03 Thread Shapira, Yoav

Howdy,

JkMount /*.jsp ajp13 is an Apache handler not a MIME type. Isn't it.

Yup, exactly.  It's an Apache handler for the *.jsp file extension.  It
instructs apache to pass files ending ending .jsp anywhere under the
server root directory (hence the /*.jsp as opposed to /someDir/*.jsp) to
the Jk connector using the ajp13 protocol.  It doesn't say anything
about client-side mime types, as Apache itself has no way of knowing
what mime type the JSP page will produce.

As Mr. Jackson said, it can be dangerous to rely on specific mime-type
conventions, as users and system administrators can change those at
will.  It's kind of like relying on the fact your user's browser will
have an address bar.  You can do it, and it'll work under controlled
circumstances (which may be good enough for your project), but it's
unsafe in general.

Yoav Shapira
Millennium ChemInformatics



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mime-Type

2003-03-03 Thread Mike Jackson
petPeeveAlert

I'm not going to argue with you, but a file without an extension will still
have a mime-type.  And a file extension doesn't 100% guarantee that the
particular file is what you expect.  File extensions are a convenience,
nothing more.  It's only because some companies (Microsoft) blindly expect
the mime-type to be determined by the file extension that we're having this
discussion.  And this short sitedness is not limited to just Microsoft, but
I blame them it popping up in other people's code.  Tomcat's own mime-type
determination code, ServletContext.getMimetype(), is based on the same short
sightedness, at least with version 4.1.12.

/petPeeveAlert

And yes, JkMount /*.jsp ajp13 is not a mime-type, its a mod_jk setup
directive.

--mikej
-=-
mike jackson
[EMAIL PROTECTED]

 -Original Message-
 From: Hostmaster of the day [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 03, 2003 9:42 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Mime-Type


 Mime Type Overview

 Mime types tell browsers how to handle specific extensions. Most Mime
 types are set globally on the server. For example, the text/html Mime
 type equates to htm, html, and shtml extensions on most servers, and
 this tells your browser to interpret all files with those extensions
 as HTML files. You can alter or add new Mime types specifically for
 your site (note that you can not alter the global Mime type values,
 only add to them). Mime types are often used to handle new
 technologies as they appear. When WAP technology first appeared
 no-one had these extensions set up on their server. With Mime types,
 however, you could have set it up yourself and begun serving WAP
 pages immediately.

 Warning: Make sure you check the list of pre-existing Mime types
 before adding new ones. Check with your hosting administrator before
 adding a Mime type, as they can easily alter the correct functioning
 of your web site.

 Note: People often get confused as to the difference between Mime
 types and Apache handlers. Basically, Mime types tell your browser
 how to handle files, while Apache handlers tell the server how to
 handle files.

 JkMount /*.jsp ajp13 is an Apache handler not a MIME type. Isn't it.


  Uh, mime-type doesn't have anything to do with a file extension.
 If I have
  a tiff image it doesn't matter what the extension is, it's still a
 tiff
  file.  Determining mime-type based based on file extensions is a
 windows
  stupidism.  Now, I'll admit there are certian conventions, but you
 can't
  100% count on them.
 
  --mikej
  -=-
  mike jackson
  [EMAIL PROTECTED]
 
   -Original Message-
   From: Hostmaster of the day [mailto:[EMAIL PROTECTED]
   Sent: Monday, March 03, 2003 8:25 AM
   To: [EMAIL PROTECTED]
   Subject: RE: Mime-Type
  
  
   Ladies and Gentleman,
  
   .jsp (e.g. index.jsp) is indeed a MIME type.
  
   Apache will know this MIME type by the following
   code if you are using mod_jk as module:
  
   JkMount /*.jsp ajp13
  
   --Dave
  
  
  
   
Howdy,
Typically, text/html as that's what the browser sees.
   
However, in a JSP (since it's really a servlet), you can set the
response content type to whatever you want, e.g. gzip or
application/ms-excel.
   
Yoav Shapira
Millennium ChemInformatics
   
   
-Original Message-
From: Anthony Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 10:36 AM
To: Tomcat Users List
Subject: Mime-Type

I did not know where ask to else this question.

Is there a mime-type for a jsp? If so, what is it?

   
  
 -
To unsubscribe, e-mail:
 [EMAIL PROTECTED]
For additional commands, e-mail:
   [EMAIL PROTECTED]
   
   
   
   
This e-mail, including any attachments, is a confidential
 business
   communication, and may contain information that is confidential,
   proprietary and/or privileged.  This e-mail is intended only for
 the
   individual(s) to whom it is addressed, and may not be saved,
 copied,
   printed, disclosed or used by anyone else.  If you are not the(an)
   intended recipient, please immediately delete this e-mail from
 your
   computer system and notify the sender.  Thank you.
   
   
   
  
 -
To unsubscribe, e-mail:
 [EMAIL PROTECTED]
For additional commands, e-mail:
 [EMAIL PROTECTED]
   
  
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail:
 [EMAIL PROTECTED]
  
 
 
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED

RE: Mime-Type

2003-03-03 Thread Mike Jackson

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 03, 2003 9:49 AM
 To: Tomcat Users List
 Subject: RE: Mime-Type
 
 

snip

 As Mr. Jackson said, it can be dangerous to rely on specific mime-type

snip

You're making me feel old here, stop that. :)

--mikej
-=-
mike jackson
[EMAIL PROTECTED] 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



configuring MIME type

2003-02-05 Thread Abhijat Thakur

Hi,

We are using Tomcat as a Web Server as well as a Servlet Engine and what we need to do 
is to configure the MIME type for Web Server which in our case is Tomcat. We want to 
configure Tomcat so that all files with the .jnlp file extension are set to the 
application/x-java-jnlp-file MIME type. Tomcat must return 
application/x-java-jnlp-file MIME type for JNLP files in order for the Java Web Start 
software to be invoked. 
How can i do this? I believe that i would have to modify some configuration file for 
this. 
thanks
abhijat





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: configuring MIME type

2003-02-05 Thread Sean Dockery
You should be able to do one (or both) of the following...

1. Edit /etc/mime.types and add the appropriate MIME type...  Re-hashing 
the mime.types file is usually required.  Can't remember how to do that 
off-hand, but I know that restarting the machine works.  :-)

2. In web.xml add the following...

webapp
  ...

  mime-mapping
extensionjnlp/extension
mime-typeapplication/x-java-jnlp-file/mime-type
  /mime-mapping

  ...

/webapp

Good luck.

At 12:07 2003-02-05 -0800, you wrote:

Hi,

We are using Tomcat as a Web Server as well as a Servlet Engine and what 
we need to do is to configure the MIME type for Web Server which in our 
case is Tomcat. We want to configure Tomcat so that all files with the 
.jnlp file extension are set to the application/x-java-jnlp-file MIME 
type. Tomcat must return application/x-java-jnlp-file MIME type for JNLP 
files in order for the Java Web Start software to be invoked.
How can i do this? I believe that i would have to modify some 
configuration file for this.
thanks
abhijat





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: configuring MIME type

2003-02-05 Thread Bill Barker
From my limited Linux use, I believe that 1) only works if you are running
behind Apache, and Apache is serving static content.  2) is probably safer
(and certainly required if either of the conditions on 1 are false).

Sean Dockery [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 You should be able to do one (or both) of the following...

 1. Edit /etc/mime.types and add the appropriate MIME type...  Re-hashing
 the mime.types file is usually required.  Can't remember how to do that
 off-hand, but I know that restarting the machine works.  :-)

 2. In web.xml add the following...

 webapp
...

mime-mapping
  extensionjnlp/extension
  mime-typeapplication/x-java-jnlp-file/mime-type
/mime-mapping

...

 /webapp

 Good luck.

 At 12:07 2003-02-05 -0800, you wrote:

 Hi,
 
 We are using Tomcat as a Web Server as well as a Servlet Engine and what
 we need to do is to configure the MIME type for Web Server which in our
 case is Tomcat. We want to configure Tomcat so that all files with the
 .jnlp file extension are set to the application/x-java-jnlp-file MIME
 type. Tomcat must return application/x-java-jnlp-file MIME type for JNLP
 files in order for the Java Web Start software to be invoked.
 How can i do this? I believe that i would have to modify some
 configuration file for this.
 thanks
 abhijat
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 Sean Dockery
 [EMAIL PROTECTED]
 Certified Java Web Component Developer
 Certified Delphi Programmer
 SBD Consultants
 http://www.sbdconsultants.com




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: service() method called Twice when using creating response with MIME type application/x-shockwave-flash

2003-01-02 Thread Cox, Charlie
I had the same problem with a .exe download and what I did was allowed
tomcat to serve the file from the filesystem so I didn't have to deal with
Range and other http features. Then I used a filter for my rules(custom
login, etc)

Charlie

 -Original Message-
 From: Bill Barker [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, December 19, 2002 12:54 AM
 To: [EMAIL PROTECTED]
 Subject: Re: service() method called Twice when using 
 creating response
 with MIME type application/x-shockwave-flash
 
 
 I don't personally use flash, but yes, the Adobe Acrobat 
 plugin for MSIE
 does much the same thing.  This is partially due to the fact that the
 Flash/Adobe plugin wants to try and stream the content (by sending a
 'Content-Range' header), and partially due to the fact that 
 MSIE is totally
 brain-dead when it comes to plugins.
 
 The first move is to try and support 'Content-Range' in your Servlet.
 You'll still get multiple requests, but hopefully it won't 
 cost as much.  If
 this isn't practical for your application, and the data isn't 
 too big, you
 could try caching the data in the session so that 
 re-generating doesn't cost
 too much.
 
 Andrew Milkowski [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Using Apache Tomcat/4.1.12 deployment, following sample code in the
 servlet
  used to demonstrate this behavior
 
  public void service (HttpServletRequest request, HttpServletResponse
  response) throws ServletException, IOException {
 
  final BufferedOutputStream bufferedOutputStream = new
  BufferedOutputStream(response.getOutputStream(), 2048);
 
  ..
  ..
  ..
 
  response.setContentType(application/x-shockwave-flash);
 
  schart.encodeAsSWF(bufferedOutputStream);  // (schart here 
 is a carting
  package that encodes swf file into the OutputStream)
 
 
  response.setHeader(Expires, -1);
  response.setHeader(nPragma, no-cache);
 
  bufferedOutputStream.flush();
  bufferedOutputStream.close();
 
  response.flushBuffer();
  }
 
  in the above service method gets called twice, before 
 rendering browser
  output with the Flash MIME content!
 
  Did anyone here had a similar experience? (maybe not 
 necessarily with a
  application/x-shockwave-flash) where service
  method is called twice before completing response..
 
  Any suggestions/solutions greatly appreciated!
 
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




service() method called Twice when using creating response with MIME type application/x-shockwave-flash

2002-12-18 Thread Andrew Milkowski
Using Apache Tomcat/4.1.12 deployment, following sample code in the servlet
used to demonstrate this behavior

public void service (HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {

final BufferedOutputStream bufferedOutputStream = new
BufferedOutputStream(response.getOutputStream(), 2048);

..
..
..

response.setContentType(application/x-shockwave-flash);

schart.encodeAsSWF(bufferedOutputStream);  // (schart here is a carting
package that encodes swf file into the OutputStream)


response.setHeader(Expires, -1);
response.setHeader(nPragma, no-cache);

bufferedOutputStream.flush();
bufferedOutputStream.close();

response.flushBuffer();
}

in the above service method gets called twice, before rendering browser
output with the Flash MIME content!

Did anyone here had a similar experience? (maybe not necessarily with a
application/x-shockwave-flash) where service
method is called twice before completing response..

Any suggestions/solutions greatly appreciated!


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: service() method called Twice when using creating response with MIME type application/x-shockwave-flash

2002-12-18 Thread Bill Barker
I don't personally use flash, but yes, the Adobe Acrobat plugin for MSIE
does much the same thing.  This is partially due to the fact that the
Flash/Adobe plugin wants to try and stream the content (by sending a
'Content-Range' header), and partially due to the fact that MSIE is totally
brain-dead when it comes to plugins.

The first move is to try and support 'Content-Range' in your Servlet.
You'll still get multiple requests, but hopefully it won't cost as much.  If
this isn't practical for your application, and the data isn't too big, you
could try caching the data in the session so that re-generating doesn't cost
too much.

Andrew Milkowski [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Using Apache Tomcat/4.1.12 deployment, following sample code in the
servlet
 used to demonstrate this behavior

 public void service (HttpServletRequest request, HttpServletResponse
 response) throws ServletException, IOException {

 final BufferedOutputStream bufferedOutputStream = new
 BufferedOutputStream(response.getOutputStream(), 2048);

 ..
 ..
 ..

 response.setContentType(application/x-shockwave-flash);

 schart.encodeAsSWF(bufferedOutputStream);  // (schart here is a carting
 package that encodes swf file into the OutputStream)


 response.setHeader(Expires, -1);
 response.setHeader(nPragma, no-cache);

 bufferedOutputStream.flush();
 bufferedOutputStream.close();

 response.flushBuffer();
 }

 in the above service method gets called twice, before rendering browser
 output with the Flash MIME content!

 Did anyone here had a similar experience? (maybe not necessarily with a
 application/x-shockwave-flash) where service
 method is called twice before completing response..

 Any suggestions/solutions greatly appreciated!





--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




MIME-TYPE for .SIS file ? please help !!

2002-11-22 Thread Daniel.T.Hellstrand
I have asked this before but didn´t get any response so I´ll try again ;)

I´m using Tomcat 4.1.12, how can I find out what MIME-TYPE to set for Symbian OS files 
(with .SIS as extension). 
I know it´s possible since you can download .sis files from 
http://www.wildpalm.co.uk/wap.wml 
Is there any way of extracting the mime-type from that link ?

/Daniel


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




SV: MIME-TYPE for .SIS file ? please help !!

2002-11-22 Thread Daniel.T.Hellstrand
I found the answer: application/vnd.symbian.install

/Dan



-Ursprungligt meddelande-
Från: Hellstrand, Daniel T. /Telia Mobile Sverige /060-14 53 75, 070-682
13 85 
Skickat: den 22 november 2002 10:31
Till: [EMAIL PROTECTED]
Ämne: MIME-TYPE for .SIS file ? please help !!


I have asked this before but didn´t get any response so I´ll try again ;)

I´m using Tomcat 4.1.12, how can I find out what MIME-TYPE to set for Symbian OS files 
(with .SIS as extension). 
I know it´s possible since you can download .sis files from 
http://www.wildpalm.co.uk/wap.wml 
Is there any way of extracting the mime-type from that link ?

/Daniel


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




mime-type for .SIS (Symbian OS file)

2002-11-20 Thread Daniel Hellstrand
What mime-type would I set in tomcat to be able to serve .sis (Symbian
OS) files ?

/Dan


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Tomcat/IIS + SSL : Mime Type problem

2002-11-12 Thread Laurent Féral-Pierssens

Hi,

We have been experiencing some problems with Mime type configuration. We
want to allow the download of wpd (WordPerfect) documents through our
webapp and with our configuration, we only get junk printed in the
browser. 

Our configuration consist of a single server, Windows 2000, with Tomcat
4.0.6 behing IIS using AJP13. We access all documents directely in the
webapp directory through SSL. The new mime types are configured in IIS
and in the web.xml of the webapp.

Here is the result of our tests:

http://server.com:8080/mywebapp/file.wpd - download properly
http://server.com/mywebapp/file.wpd - download properly
http://server.com/file.wpd - download properly
https://server.com/file.wpd - download properly

https://server.com/mywebapp/file.wpd - junk

Looking at that, it looks like a connector problem with SSL. Is there a
setting I misconfigured?


Thank you for your help,
Laurent


 


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




binary file mime type registration

2002-10-28 Thread Dan Wygant
Ho wdo I specify that a VBD file should be passed across as a binary type
and not displayed in the browser? Likewise for Excel and Word documents.


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




default mime-type

2002-10-11 Thread Günter Kukies

Hello,

what is the default mime-type when tomcat can't find a matching extention in the 
servers conf/web.xml?

Thanks
Günter Kukies



Re: default mime-type

2002-10-11 Thread unplug

It is text/plain.

Günter Kukies wrote:
 
Part 1.1Type: Plain Text (text/plain)
Encoding: quoted-printable

-- 
http://dotw.no-ip.com

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: default mime-type

2002-10-11 Thread Günter Kukies

How can I change it?

Günter

- Original Message -
From: unplug [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, October 11, 2002 11:02 AM
Subject: Re: default mime-type


 It is text/plain.

 Günter Kukies wrote:
 
 Part 1.1Type: Plain Text (text/plain)
 Encoding: quoted-printable

 --
 http://dotw.no-ip.com

 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




MIME type

2002-09-27 Thread Mistry, Samir (US - Boston)

This is a quick question about Tomcat config.  How can configure Tomcat so 
that it sends HTML rather than octet-stream? 
  
Thanks, 
Samir 


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




AW: HELP! Configuring HTTP-headers per mime type?

2002-09-10 Thread Power-Netz \(Schwarz\)

   I'd like to send out the following HTTP headers for all *.xml files
 Content-Cache=maxage=3600 while for *.jsp it should be
 Content-Cache=no-cache.

   I know how to configure headers per mime type under Apache,
 but how is this
 done under Tomcat? *Can* it be done?

simple :

 response.setHeader(Cache-Control,no-cache);

You can define any header you want... some headers have theire own
methodecalls
like :

 response.setContentType(filter.getType());
 response.setHeader(Content-length,String.valueOf(bytes.length));

 where getType() is just a normal mime-string

cu


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: AW: HELP! Configuring HTTP-headers per mime type?

2002-09-10 Thread Gili


That won't work. What you mentioned only works for JSP files, not XML or 
HTML files. There has to be a way to specify headers externally from the file itself.

Gili

On Tue, 10 Sep 2002 10:04:38 +0200, Power-Netz \(Schwarz\) wrote:

  I'd like to send out the following HTTP headers for all *.xml files
 Content-Cache=maxage=3600 while for *.jsp it should be
 Content-Cache=no-cache.

  I know how to configure headers per mime type under Apache,
 but how is this
 done under Tomcat? *Can* it be done?

simple :

 response.setHeader(Cache-Control,no-cache);

You can define any header you want... some headers have theire own
methodecalls
like :

 response.setContentType(filter.getType());
 response.setHeader(Content-length,String.valueOf(bytes.length));

 where getType() is just a normal mime-string

cu


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




AW: AW: HELP! Configuring HTTP-headers per mime type?

2002-09-10 Thread Ralph Einfeldt

To do that for other files you can implement a servlet 
filter that sets the header with the given code.

 -Ursprüngliche Nachricht-
 Von: Gili [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 10. September 2002 14:05
 An: Power-Netz (Schwarz); Tomcat Users List
 Betreff: Re: AW: HELP! Configuring HTTP-headers per mime type?
 
   That won't work. What you mentioned only works for JSP 
 files, not XML or 
 HTML files. There has to be a way to specify headers 
 externally from the file itself.
 

snip/

  response.setHeader(Cache-Control,no-cache);
 

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: AW: AW: HELP! Configuring HTTP-headers per mime type?

2002-09-10 Thread Gili

On Tue, 10 Sep 2002 14:10:14 +0200, Ralph Einfeldt wrote:

To do that for other files you can implement a servlet 
filter that sets the header with the given code.

And how do you tell Tomcat to tell that filter for that mime type?

Gili


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




AW: AW: AW: HELP! Configuring HTTP-headers per mime type?

2002-09-10 Thread Ralph Einfeldt

The filter would be more general.

Define a filter that is triggered for every request.
In the filter set the header depending on the kind
of object that is requested. (The simple solution: 
map extensions to mime types. What's good for an 
operation system or for tomcat should be enough for 
you too :} )

 -Ursprüngliche Nachricht-
 Von: Gili [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 10. September 2002 15:27
 An: Ralph Einfeldt; Tomcat Users List
 Betreff: Re: AW: AW: HELP! Configuring HTTP-headers per mime type?
 
   And how do you tell Tomcat to tell that filter for that 
 mime type?
 

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: AW: AW: AW: HELP! Configuring HTTP-headers per mime type?

2002-09-10 Thread Gili

On Tue, 10 Sep 2002 16:27:37 +0200, Ralph Einfeldt wrote:

The filter would be more general.

Define a filter that is triggered for every request.
In the filter set the header depending on the kind
of object that is requested. (The simple solution: 
map extensions to mime types. What's good for an 
operation system or for tomcat should be enough for 
you too :} )

Yes, I understand, but what I am asking is where does one tell Tomcat to use 
my filter for every request?

Thanks,
Gili


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: AW: AW: AW: HELP! Configuring HTTP-headers per mime type?

2002-09-10 Thread Cox, Charlie

 -Original Message-
 From: Gili [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 10, 2002 10:39 AM
 To: Ralph Einfeldt; Tomcat Users List
 Subject: Re: AW: AW: AW: HELP! Configuring HTTP-headers per mime type?
 
 
 On Tue, 10 Sep 2002 16:27:37 +0200, Ralph Einfeldt wrote:
 
 The filter would be more general.
 
 Define a filter that is triggered for every request.
 In the filter set the header depending on the kind
 of object that is requested. (The simple solution: 
 map extensions to mime types. What's good for an 
 operation system or for tomcat should be enough for 
 you too :} )
 
   Yes, I understand, but what I am asking is where does 
 one tell Tomcat to use 
 my filter for every request?

in your web.xml.

filter-mapping
filter-nameMyFilter/filter-name
url-pattern*.html/url-pattern
/filter-mapping

Charlie
 
 Thanks,
 Gili
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




HELP! Configuring HTTP-headers per mime type?

2002-09-09 Thread Gili

Hi,

I'd like to send out the following HTTP headers for all *.xml files 
Content-Cache=maxage=3600 while for *.jsp it should be Content-Cache=no-cache.

I know how to configure headers per mime type under Apache, but how is this 
done under Tomcat? *Can* it be done?

Thanks,
Gili


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Visio Mime Type Problem

2002-07-17 Thread Katilie, Karen

I have the following link in my jsp:

  a href=visiodrawing.vsdVisio Drawing/a

When this link is clicked on, garbage is displayed on the screen instead
of Visio being opened and the drawing displayed. I can open the drawing
using asp and iis but not jsp and tomcat. Is there something that I need
to configure within tomcat in order to get this to work? Also, the same
problem occurs with excel spreadsheets but not with word documents or
pdfs. I am using the binary distribution version of tomcat 4.0.4 running
on a windows 2000 server.

Thanks for your help!

Karen

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Visio Mime Type Problem

2002-07-17 Thread Turner, John


MIME type mapping in your web-xml.

Here's the mapping for Excel, as an example:

mime-mapping
extensionxls/extension
mime-typeapplication/vnd.ms-excel/mime-type
/mime-mapping

You'll have to track down the correct MIME type for a Visio file.

John Turner
[EMAIL PROTECTED]


-Original Message-
From: Katilie, Karen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 17, 2002 1:33 PM
To: 'Tomcat Users List'
Subject: Visio Mime Type Problem


I have the following link in my jsp:

  a href=visiodrawing.vsdVisio Drawing/a

When this link is clicked on, garbage is displayed on the screen instead
of Visio being opened and the drawing displayed. I can open the drawing
using asp and iis but not jsp and tomcat. Is there something that I need
to configure within tomcat in order to get this to work? Also, the same
problem occurs with excel spreadsheets but not with word documents or
pdfs. I am using the binary distribution version of tomcat 4.0.4 running
on a windows 2000 server.

Thanks for your help!

Karen

--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Visio Mime Type Problem

2002-07-17 Thread Katilie, Karen

Thank you. I was not sure where to the mime type was specified. 

Karen

-Original Message-
From: Turner, John [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 17, 2002 1:39 PM
To: 'Tomcat Users List'
Subject: RE: Visio Mime Type Problem



MIME type mapping in your web-xml.

Here's the mapping for Excel, as an example:

mime-mapping
extensionxls/extension
mime-typeapplication/vnd.ms-excel/mime-type
/mime-mapping

You'll have to track down the correct MIME type for a Visio file.

John Turner
[EMAIL PROTECTED]


-Original Message-
From: Katilie, Karen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 17, 2002 1:33 PM
To: 'Tomcat Users List'
Subject: Visio Mime Type Problem


I have the following link in my jsp:

  a href=visiodrawing.vsdVisio Drawing/a

When this link is clicked on, garbage is displayed on the screen instead
of Visio being opened and the drawing displayed. I can open the drawing
using asp and iis but not jsp and tomcat. Is there something that I need
to configure within tomcat in order to get this to work? Also, the same
problem occurs with excel spreadsheets but not with word documents or
pdfs. I am using the binary distribution version of tomcat 4.0.4 running
on a windows 2000 server.

Thanks for your help!

Karen

--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




mime-type setting

2002-06-25 Thread unplug

Hi all,

  I want to set mime-type in tomcat 3.3.  However, I can't find the
web.xml under $TOMCAT_HOME/conf (there is a default web.xml under
$TOMCAT_HOME/conf for tomcat 3.2).  Also I can't find any document
about setting mime-type in tomcat 3.3.  Where to set mime-type in
order to make tomcat works?  Anyway example of web.xml format?

Rgds,
unplug

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: mime-type setting

2002-06-25 Thread Jacob Kjome

Check out the Tomcat 4.x.x conf/web.xml.  You can use that format and that 
ordering and apply it to your own app's web.xml.  I don't think that Tomcat 
3.3.x uses a conf/web.xml.

Also, take a look at the dtd by downloading it.  It specifies the tag 
order.  Use the URI in your dtd declaration of your web.xml file and load 
that in any browser to download it.

Jake

At 03:32 PM 6/25/2002 +0800, you wrote:
Hi all,

   I want to set mime-type in tomcat 3.3.  However, I can't find the
web.xml under $TOMCAT_HOME/conf (there is a default web.xml under
$TOMCAT_HOME/conf for tomcat 3.2).  Also I can't find any document
about setting mime-type in tomcat 3.3.  Where to set mime-type in
order to make tomcat works?  Anyway example of web.xml format?

Rgds,
unplug

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]



problem with mime-type application/csv

2002-05-22 Thread Ueli Staempfli

I would like to return a stream through my application an save it as a
CSV-File. I tried adding

mime-mapping
extension csv /extension
mime-type application/csv /mime-type
/mime-mapping

to my web.xml file in the conf directory of Tomcat(3.2.3) and it didn't
work. The mime-type is set to application/csv so the browser should
recognize it (it's not a file with extension *.csv) and show the save-as
dialog (?). Instead of that the text appears in the browser as normal html
output.
I tried it with ie5.5 and netscape6.2.
I saw various messages with questions about this problem, but no answer...


Any help appreciated...
Ueli


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: problem with mime-type application/csv

2002-05-22 Thread Keith Wannamaker

You can't force a save-as because IE ignores 
the content-type header in many cases.  If
you search the MSKB you will see various articles
about this.  All Tomcat can do is set the content
type on the response, you might want to verify
this is happening.

Keith

| -Original Message-
| From: Ueli Staempfli [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, May 22, 2002 8:36 AM
| To: [EMAIL PROTECTED]
| Subject: problem with mime-type application/csv
| 
| 
| I would like to return a stream through my application an save it as a
| CSV-File. I tried adding
| 
| mime-mapping
| extension csv /extension
| mime-type application/csv /mime-type
| /mime-mapping
| 
| to my web.xml file in the conf directory of Tomcat(3.2.3) and it didn't
| work. The mime-type is set to application/csv so the browser should
| recognize it (it's not a file with extension *.csv) and show the save-as
| dialog (?). Instead of that the text appears in the browser as normal html
| output.
| I tried it with ie5.5 and netscape6.2.
| I saw various messages with questions about this problem, but no answer...
| 
| 
| Any help appreciated...
| Ueli
| 
| 
| --
| To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
| For additional commands, e-mail: mailto:[EMAIL PROTECTED]
| 
| 

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: problem with mime-type application/csv

2002-05-22 Thread eceecmo

Hi,

I'm trying to download tomcat 4.0 (v.4.0.3 ) for SOLARIS 6 from
jakarta.apache.org but I'm not really sure which one/ones should I download?

There's a path
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.3/bin/; with  a
jakarta-tomcat-4.0.3.zip file but also, there's another inside that
../solaris6/sparc with two other libraries nsapi_redirector.so /
nsapi_redirector.so.asc (and these ones are for?)

Thank you,
///



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Missing MIME-type in Tomcat 4.0.2 errors?

2002-02-25 Thread Anders Rundgren

Hi,
I got at rather funny line (HTML displayed as raw text) using
Netscape 6.2.1 and it seems to be caused by a missing
MIME-type in Tomcat 4.0.2 error messages.

Is this a known problem?
How do you change this behavior?

cheers,
Anders


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




Re: Missing MIME-type in Tomcat 4.0.2 errors?

2002-02-25 Thread Remy Maucherat

 Hi,
 I got at rather funny line (HTML displayed as raw text) using
 Netscape 6.2.1 and it seems to be caused by a missing
 MIME-type in Tomcat 4.0.2 error messages.
 
 Is this a known problem?
 How do you change this behavior?

Yes, it's a known issue.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6468
(Using Mozilla, I didn't have any problem, somehow)

Unfortunately, I don't know any workaround for it except patching the code.

Remy


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




HTTP Redirect, Mime Type, and IE

2002-02-18 Thread Brian O'Kelley

I apologize if this has already been answered.. I've looked around and
can't find anything that works.
 
I have a servlet, coming through Tomcat, that spits out PDF using FOP.
So far so good.
However, it requires the user to login first. If the user isn't logged
in, it redirects the user to an HTML page.
 
If I login, go to the page and generate a PDF file, then things are
fine. Up pops Acrobat.
If I then restart Tomcat to zap the session, and hit refresh, I see the
redirect happen on the server side, but IE pops up with an error. It
just shows a little broken image picture. I can do a view source, and I
see
htmlbody leftmargin=0 topmargin=0 scroll=no embed width=100%
height=100% fullscreen=yes src=
http://192.168.1.1/servlet/blah?blah=20 
http://192.168.1.1/servlet/blah?blah=20;/body/html
 
Any ideas on what's happening here? I was speculating that it was
ignoring the redirect, since I don't see the second request come into
Tomcat. So what's the deal? 
 
Thanks in advance,
Brian



mime type for Excel files

2002-01-14 Thread Jim Dempsey

I am having a problem with Tomcat 4.0.1 serving Microsoft Excel files.  
When Tomcat serves the static document to the client, the client does not
open up the file properly
(e.g. it displays binary data)

I have added the following mimetype to the conf/web.xml file and restarted
the server:
mime-mapping
extensionxls/extension
mime-typeapplication/vnd.ms-excel/mime-type
  /mime-mapping

I have even tried using this configuration:
mime-typeapplication/excel/mime-type

But if I use Apache to serve the document, it works just fine.

Is there a special mimetype configuration for Microsoft Excel files for use
within Tomcat?
I have tried using Tomcat running on Windows2000, WindowsNT and Solaris.  
The Client is using Microsoft Internet Explorer 5.5





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




mime type for Excel files

2002-01-14 Thread Jim Dempsey

I am having a problem with Tomcat 4.0.1 serving Microsoft Excel files.  
When Tomcat serves the static document to the client, the client does not
open up the file properly
(e.g. it displays binary data)

I have added the following mimetype to the conf/web.xml file and restarted
the server:
mime-mapping
extensionxls/extension
mime-typeapplication/vnd.ms-excel/mime-type
  /mime-mapping

I have even tried using this configuration:
mime-typeapplication/excel/mime-type

But if I use Apache to serve the document, it works just fine.

Is there a special mimetype configuration for Microsoft Excel files for use
within Tomcat?
I have tried using Tomcat running on Windows2000, WindowsNT and Solaris.  
The Client is using Microsoft Internet Explorer 5.5



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




Mime-Type JNLP does not work

2001-09-18 Thread Christian Amann

Hello Friends,

I want to add an additional MIME-Type for accessing JavaWebStart-Files
(*.jnlp). I was trying the following in TOMCAT_HOME/conf/web.xml:

mime-mapping
extensionjnlp/extension
  mime-typeapplication/x-java-jnlp-file/mime-type
/mime-mapping

Bad thing - it does not work. The browser receives a plain XML-file instead
of invoking JavaWebStart. I also tried to place this line in
/WEB-INF/web.xml. Same thing.
If I add this Mime-type in IIS, everything works properly.

Any ideas?

Thanks a lot :)

Christian Amann




RE: Mime-Type JNLP does not work

2001-09-18 Thread Ignacio J. Ortega

This question and much others are being asked and answered ad nauseam,
please use the Mail Archive facilities to alleviate some work and
bandwidth to all people.. TIA

http://jakarta.apache.org/site/mail2.html

Which version of tomcat do you use?

Please Report information about the Tomcat version and Plataform you
use, to be able to say something accurate.. but ..

Tomcat 3.2.X and up to 3.3 does not use in any way
%TOMCAT_HOME%/conf/web.xml.. As is not a spec compliant way to specify
such things..

Tomcat 4.0 does use that file ..

Saludos ,
Ignacio J. Ortega


 -Mensaje original-
 De: Christian Amann [mailto:[EMAIL PROTECTED]]
 Enviado el: martes 18 de septiembre de 2001 15:46
 Para: [EMAIL PROTECTED]
 Asunto: Mime-Type JNLP does not work
 
 
 Hello Friends,
 
 I want to add an additional MIME-Type for accessing JavaWebStart-Files
 (*.jnlp). I was trying the following in TOMCAT_HOME/conf/web.xml:
 
 mime-mapping
   extensionjnlp/extension
   mime-typeapplication/x-java-jnlp-file/mime-type
 /mime-mapping
 
 Bad thing - it does not work. The browser receives a plain 
 XML-file instead
 of invoking JavaWebStart. I also tried to place this line in
 /WEB-INF/web.xml. Same thing.
 If I add this Mime-type in IIS, everything works properly.
 
 Any ideas?
 
 Thanks a lot :)
 
 Christian Amann
 
 



Re: How to configure extension - MIME type mapping

2001-09-11 Thread matt mcConnell

 In conf folder there is a web.xml file. To send wml content u have to
 modify this file and add following block in it.

Thanks for the help.  From what I had seen, this type of configuration was
no longer supported in the conf/web.xml file as of Tomcat 3.3(the package
doesn't even include this conf/web.xml, though v3.2.* does).  I tried
putting lines similar to the ones you sent in webapps/app/WEB-INF/web.xml
and it seems to be working.

matt

---
The real problem is entropy.




How to configure extension - MIME type mapping

2001-09-10 Thread matt mcConnell

Hi,
I've seen this topic discussed a few times in the mailing list archives
(but nowhere in the documents).  I'm using Tomcat (v3.3, b1) as a standalone
server and have a file with some WML script in it (normal file, on disk).  I
would like it to be sent to the client as MIME type
application/vnd.wap.wmlscriptc, but Tomcat just sends it as text/plain (I
suppose that is the default).  I have seen that this can be configured in
the web application's web.xml file, but what are the elements used to do
this and where should I place them?  Are the DTDs for the various XML
configuration files available anywhere?

Thanks,

matt

---
The real problem is entropy.






Re: How to configure extension - MIME type mapping

2001-09-10 Thread Ketan Patel

Hi,
In conf folder there is a web.xml file. To send wml content u have to 
modify this file and add following block in it.
mime-mapping
extension
wml
/extension
mime-type
application/vnd.wap.wmlscript
/mime-type
/mime-mapping


matt mcConnell wrote:
 
 Hi,
 I've seen this topic discussed a few times in the mailing list archives
 (but nowhere in the documents).  I'm using Tomcat (v3.3, b1) as a standalone
 server and have a file with some WML script in it (normal file, on disk).  I
 would like it to be sent to the client as MIME type
 application/vnd.wap.wmlscriptc, but Tomcat just sends it as text/plain (I
 suppose that is the default).  I have seen that this can be configured in
 the web application's web.xml file, but what are the elements used to do
 this and where should I place them?  Are the DTDs for the various XML
 configuration files available anywhere?
 
 Thanks,
 
 matt
 
 ---
 The real problem is entropy.

_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




apache loses mime-type header

2001-07-30 Thread Maureen Fisher

Has anyone seen this?
The setup is apache 1.3.14 and tomcat 3.2.1 on AIX. The servlet correctly sets the 
header and with tomcat set up to accept HTTP requests, everything displays fine.
However, if we access the same servlet through apache's port, it gets displayed as 
text/plain instead.
Any ideas?

Maureen Fisher, CIT/ID, Cornell University
Ithaca, NY 14850
[EMAIL PROTECTED]
http://mo.cit.cornell.edu/

Treat people as if they were what they ought to be and you help them 
to become what they are capable of being.
--Johann Wolfgang von Goethe




problem with mime type?

2001-06-24 Thread William Rosenkranz


i am using tomcat 4.0-b5 with JDK 1.3 on a windows 2000 pro system.
i removed crimson.jar and jaxp.jar and installed xalan.jar and
xerces.jar from the 2.1.0 java dist. the servlet i wrote to do
the XML-HTML thing via XSLT works fine.

i added a mime type for excel (xls) files in conf/web.xml. i did
this just after the entry for application/msword. i tried both
application/vnd.ms-excel and application/excel (the former being
the propper type, according to IANA). when i request an excel
spreadsheet (with IE5) with:

http://localhost:8080/foo/EXCEL/bar.xls

IE5 does not appear to recognize it as excel. the precise way i
am getting this is:

* webapps/foo is my app
* i ask for URL http://localhost:8080/foo/ which gives
  me index.html in the foo dir
* index.html has 3 frames which are in foo/frames
* one of the frames has a link to ../EXCEL/bar.xls
  which gets translated to the URL above.

if, instead, i use

file://%CATALINA_HOME%/webapps/foo/EXCEL/bar.xls

(where %CATALINA_HOME% is like C:/Jakarta/tomcat/4.0-b5) in the link,
it works fine (ie, IE5 opens the file as excel).

is it me or is this a bug in tomcat? i am fairly certain that
apache 1.3.x does this correctly on both NT and unix (hpux).

note: i restarted tomcat after changing conf/web.xml with a
shutdown/startup cycle.

just in case my servlet is somehow intercepting, in doGet() i do
a request.getReqestURI() and test endsWith(xls) on the string.
(as it turns out, my servlet has nothing to do with this.)

thanx

-bill



servlet chain triggered by mime type

2001-05-13 Thread Xiangrong Fang

Hi there,

I'm new to this list. Here I have a question about tomcat. I hope to get
help from you:

How to trigger servlet chain by a mime type in tomcat? That is to say,
set the resp.contentType(blah/blah) to trigger the second servlet,
instead of using fancy apis like responseDispather.forward().

Thanks a lot for any help.

-- 
Xiangrong Fang [EMAIL PROTECTED]




Re: How to use text/vnd.wap.wml MIME Type ?

2001-03-03 Thread Bo Xu

Vijay Suryawanshi wrote:

 How to use text/vnd.wap.wml MIME Type to serve WML pages from Tomkat ?
 It's not working after putting mime type mappings in web.xml. This is
 similar problem that Raf Colson had faced.

 Raf, did u get any workaroud ? If you could help me in this regard,
 that would be appriciated.Thanks and Regards, Vijay
 [...]

Hi :-)   if you use jakarta-tomcat-4.0-b1, did you ever try to add
the following into TOMCAT_HOME/conf/web.xml?

  mime-mapping
extensionwml/extension
mime-typetext/vnd.wap.wml/mime-type
  /mime-mapping
  mime-mapping
extensionwbmp/extension
mime-typeimage/vnd.wap.wbmp/mime-type
  /mime-mapping
  ...


Bo
Mar.03, 2001




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Tomcat 3.2.1/Mime type ignored

2001-01-11 Thread Robert Wohleb

One of the programmers will hopefully shoot this statement down, but
that sounds like a bug. The .whatever filter is being applied from left
to right. It should be the other way; right to left.

~Rob

Sanjay Madhavan wrote:
 
 I have tried inserting the mime type declarations into the individual
 webapp/web.xml file but it still does not work.
 
 Additionally files which have a filename like test.sample.xxx where xxx is
 the mime type are not treated as files with mime type xxx but if I rename
 the file to be testSample.xxx then they are treated as the correct mime
 type.
 
 /sanjay
 
 -Original Message-
 From: William Brogden [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 11, 2001 2:28 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Tomcat 3.2.1/Mime type ignored
 
 Sanjay Madhavan wrote:
 
  I am unable to get Tomcat 3.2.1 to recognise any new mime types that I
 enter
  into the conf/web.xml file.
 
  Tomcat seems to ignore these new mime types and returns the document as a
  text/plain document.
 
 As I understand it, 3.2 does indeed ignore /conf/web.xml
 entirely. You have to put the mime types in the individual
 application web.xml files.
 
 Supposedly with 4.2 it goes back to looking at /conf/web.xml
 
 --
 WBB - [EMAIL PROTECTED]
 Java Cert mock exams http://www.lanw.com/java/javacert/
 Author of Java Developer's Guide to Servlets and JSP
 ISBN 0-7821-2809-2
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]

-- 
___

 Robert Wohleb
 Web Applications Development Manager
 Parafoil Software, Inc.
___

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Tomcat 3.2.1/Mime type ignored

2001-01-10 Thread Sanjay Madhavan

I am unable to get Tomcat 3.2.1 to recognise any new mime types that I enter
into the conf/web.xml file.

Tomcat seems to ignore these new mime types and returns the document as a
text/plain document.

I have looked at the FAQ and there is already a query from a user stating
that he has the same problem but I did not see any answers or
acknowledements that this is a genuine problem and will/has been fixed.

Is there any workaround?

Regards

Sanjay






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Tomcat 3.2.1/Mime type ignored

2001-01-10 Thread William Brogden



Sanjay Madhavan wrote:
 
 I am unable to get Tomcat 3.2.1 to recognise any new mime types that I enter
 into the conf/web.xml file.
 
 Tomcat seems to ignore these new mime types and returns the document as a
 text/plain document.

As I understand it, 3.2 does indeed ignore /conf/web.xml
entirely. You have to put the mime types in the individual
application web.xml files.

Supposedly with 4.2 it goes back to looking at /conf/web.xml

-- 
WBB - [EMAIL PROTECTED]
Java Cert mock exams http://www.lanw.com/java/javacert/
Author of Java Developer's Guide to Servlets and JSP 
ISBN 0-7821-2809-2

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Tomcat 3.2.1/Mime type ignored

2001-01-10 Thread Sanjay Madhavan

I have tried inserting the mime type declarations into the individual
webapp/web.xml file but it still does not work.

Additionally files which have a filename like test.sample.xxx where xxx is
the mime type are not treated as files with mime type xxx but if I rename
the file to be testSample.xxx then they are treated as the correct mime
type.

/sanjay

-Original Message-
From: William Brogden [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 11, 2001 2:28 AM
To: [EMAIL PROTECTED]
Subject: Re: Tomcat 3.2.1/Mime type ignored




Sanjay Madhavan wrote:

 I am unable to get Tomcat 3.2.1 to recognise any new mime types that I
enter
 into the conf/web.xml file.

 Tomcat seems to ignore these new mime types and returns the document as a
 text/plain document.

As I understand it, 3.2 does indeed ignore /conf/web.xml
entirely. You have to put the mime types in the individual
application web.xml files.

Supposedly with 4.2 it goes back to looking at /conf/web.xml

--
WBB - [EMAIL PROTECTED]
Java Cert mock exams http://www.lanw.com/java/javacert/
Author of Java Developer's Guide to Servlets and JSP
ISBN 0-7821-2809-2

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




MIME-type filter

2001-01-04 Thread

Hi everyone~~

I'd like to know that Tomcat4.0 can support MIME-type filter.

and if it does, how to config and use?





Re: Q: PDF mime type not working

2000-12-29 Thread Eric Johnson

Hi,

Are you using Internet Explorer to view the page? In our experience, the
newer versions (I'm not sure if it's all the 5.x series or only 5.5) no
longer are willing to honor the complete MIME protocol -- although
amazingly enough, they do recognize MS Word and Excel files.

Try using Netscape and see if that helps.

If this is the source of your problem, there is no workaround to the best
of my knowledge.

-- Eric Johnson
-- [EMAIL PROTECTED]

Perfectionism is the enemy of creation...

-- John Updike

On Fri, 29 Dec 2000, Michael Wentzel wrote:

 I have written a Servlet that generates a pdf on the fly
 and outputs the result to the browser but all that ends
 up happening is the raw text get displayed instead of
 starting the adobe helper app and loading the generated
 doc.

 I have added the following to web.xml for my webapp:
 mime-mapping !-- PDF mime --
 extension
 pdf
 /extension
 mime-type
 application/pdf
 /mime-type
 /mime-mapping

 I also set the Response content type to application/pdf
 before anything gets written to the OutputStream.

 Any ideas on what I might be doing wrong?  Thanks.


 ---
 Michael Wentzel   4939 Lower Roswell Road
 Software DeveloperSuite 201B
 Software As We Think  Marietta, GA  30068


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Q: PDF mime type not working

2000-12-29 Thread Michael Wentzel

 Are you using Internet Explorer to view the page? In our 
 experience, the
 newer versions (I'm not sure if it's all the 5.x series or 
 only 5.5) no
 longer are willing to honor the complete MIME protocol -- although
 amazingly enough, they do recognize MS Word and Excel files.

Thanks, actually it was just a stupid mistake by me.  I setContentType
before I got the OutputStream instead of after and so it actually 
though it was just a raw OutputStream.  We are using IE ver 5.0 and
it still seems to support the mime protocol(What a MS-ish thing to do...).

That's a good thing to know about the higher versions of IE though.
Thanks again.


---
Michael Wentzel 4939 Lower Roswell Road
Software Developer  Suite 201B
Software As We ThinkMarietta, GA  30068

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Problems with MIME-type mappings

2000-12-20 Thread Immo Heino

Hi folks,

I have recently started to use a tomcat-3.2.1 instead of the
old tomcat-3.1 version  and  encountered a strange configuration problem.

Currently I have mapped the old tomcat version 3.1  to the port 8080 and
new one (3.2.1) to  8088. Both use the same  /conf/web.xml file (with no 
differences):

[immo@jimbo immo]$ diff jakarta-tomcat/conf/web.xml  
jakarta-tomcat-3.2.1/conf/web.xml
[immo@jimbo immo]$

which also includes the appropriate  MIME-mapping for wap/wml-MIME type:

mime-mapping
   extension
   wml
   /extension
   mime-type
   text/vnd.wap.wml
   /mime-type
   /mime-mapping
  

I also imagine that both server.xml configuration files are properly 
configured (?), TOMCAT_HOME
is set. etc 

I have the same  application (or the context) on both versions ,
this is under the 3.2.1.-version:

[immo@jimbo immo]$  ls jakarta-tomcat-3.2.1/webapps/spll/*
jakarta-tomcat-3.2.1/webapps/spll/WEB-INF:
classes  lib  web.xml  web.xml~

jakarta-tomcat-3.2.1/webapps/spll/wml:
SPLLregister.wml  start.wml  start.wml~  

and exactly the same structure under tomcat-3.1 folders:

[immo@jimbo immo]$ ls jakarta-tomcat/webapps/spll/*
jakarta-tomcat/webapps/spll/WEB-INF:
classes  lib  web.xml  web.xml~

jakarta-tomcat/webapps/spll/wml:
SPLLregister.wml  start.wml  start.wml~   

so basically those are identical.

But now the  problem- when accessing
different tomcat versions the HTTP Content-type
headers differ. Here is what is given form the new version (tomcat-3.2.1)
(accessing the port via telnet for a demonstrating purpose):


[immo@jimbo immo]$ telnet localhost 8088
Trying 127.0.0.1...
Connected to jimbo.tte.vtt.fi.
Escape character is '^]'.
GET /spll/wml/start.wml HTTP/1.0

HTTP/1.0 200 OK
Content-Type: text/plain
Content-Length: 1552
Last-Modified: Sat, 16 Dec 2000 10:44:32 GMT
Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2; Java 
1.3.0beta; Linux 2.2.14-5.0 i386; java.ven
dor=Sun Microsystems Inc.)

?xml version="1.0"?

and here is from the old version (Tomcat-3.1):

[immo@jimbo immo]$ telnet localhost 8080
Trying 127.0.0.1...
Connected to jimbo.tte.vtt.fi.
Escape character is '^]'.
GET /spll/wml/start.wml HTTP/1.0

HTTP/1.0 200 OK
Date: Wed, 20 Dec 2000 08:17:42 GMT
Status: 200
Servlet-Engine: Tomcat Web Server/3.1 (JSP 1.1; Servlet 2.2; Java 
1.3.0beta; Linux 2.2.14-5.0 i386; java.vendo
r=Sun Microsystems Inc.)
Content-Type: text/vnd.wap.wml
Last-Modified: Sat, 16 Dec 2000 10:44:32 GMT
Content-Length: 1552
Content-Language: en

?xml version="1.0"?`

Note the difference : text/plain versus text/vnd.wap.wml !  Now the
question is , what I'm doing wrong or what/how should I configure
Tomcat 3.2.1 that the  /conf/web.xml  - file will also be valid for the 
newversion
(so that I will get a text/vnd.wap.wml - header  from.wml files ) ??
Now it doesn't seem to have any effects with Tomcat 3.2.1.

Servlets are working similar way on both configurations, but these static
wml-files are the problem.

Any help is appreciated !

Regards,

Immo







Re: Tomcat3.2 final doesn't support user defined MIME type

2000-12-20 Thread Craig R. McClanahan

Jason Zhu wrote:

 Another prove is: after I delete "TOMCAT_HOME\conf\web.xml" file, the
 tomecat still starts up without complaining or error.  It seems to me that
 tomcat doesn't read "TOMCAT_HOME\conf\web.xml" file.  Nor such messages
 printed on the dos prompt window.

You are correct -- Tomcat 3.2 does *not* read the $TOMCAT_HOME/conf/web.xml
file.  You should be placing your MIME mappings in the WEB-INF/web.xml file for
your own application.

Craig McClanahan





Tomcat3.2 final doesn't support user defined MIME type

2000-12-19 Thread Jason Zhu

Hi, Tomcat Developers:

Excuse me if this bug has been already reported.  I also reported this bug
into Bugrat system.  ID629.

Bug:
Tomcat3.2 doesn't support user defined MIME type in added
"TOMCAT_HOME\conf\web.xml".  Instead, it returns text/plain.

Environment:
Windows NT, Service Pack 5.  Pantium III.  2 Processors.  256MB RAM.

Reproduce:
Deploy an application on Tomcat3.2 for client downloading throught Java Web
Start 1.0.
It is working perfect on Tomcat3.1Beta.  Haven't tested on Tomcat3.1.

Work Around:
By looking into source code provided, org.apache.tomcat.util.MimeMap class
provides a default map and a user defined map.  There is also a method:
addContentType() which is used to add a user defined type into the user
defined map.  But by searching the whole source, there is only one class:
org.apache.tomcat.core.Context calls this inside its own addContentType()
method.  So actually this is never been called to add a user defined mime
type.
Another prove is: after I delete "TOMCAT_HOME\conf\web.xml" file, the
tomecat still starts up without complaining or error.  It seems to me that
tomcat doesn't read "TOMCAT_HOME\conf\web.xml" file.  Nor such messages
printed on the dos prompt window.
Work around:  In org.apache.tomcat.util.MimeMap.java I added one more line
in Static initializer: defaultMap.put("jnlp",
"application/x-java-jnlp-file"); and I recompiled this class, overwrote the
one in TOMCAT_HOME\lib\webserver.jar.  Finally it returns the correct mime
type for jnlp.


Thanks for your time.

Regards

Jason Zhu
Java Programmer
time:frame
Beacon IT Group
Phone: 0061-2-9413 3522
Email: [EMAIL PROTECTED]




Re: Tomcat3.2 final doesn't support user defined MIME type

2000-12-19 Thread cmanolache

 Bug:
 Tomcat3.2 doesn't support user defined MIME type in added
 "TOMCAT_HOME\conf\web.xml".  Instead, it returns text/plain.

You should set the MIME types in the webapplication's web.xml.

This has been a source of confusion in the past, and a big mistake - if
you want portable web applications you need to define all the settings for
the application in WEB-INF/web.xml - not in tomcat's config.

In the past, tomcat used to read TOMCAT_HOME/conf/web.xml as a
configuration file - that was before server.xml was really used. It was a
nice and cool idea initially - but it was very wrong as it led to a lot of
confusion in the code and for the users. 

 Another prove is: after I delete "TOMCAT_HOME\conf\web.xml" file, the
 tomecat still starts up without complaining or error.  It seems to me that
 tomcat doesn't read "TOMCAT_HOME\conf\web.xml" file.  Nor such messages
 printed on the dos prompt window.

That's perfectly true. All server configuration is in server.xml

The best workaround is to define the setting in your application's 
web.xml file.


Thanks for the report,
Costin