Get MIME type of file returns application/octet-stream for all but txt

Eclipse 3.3.1.1, JRE 1.6.0_03, Tomcat 6.0, webwork 2.2.4
I've created a test upload/view file page. I can successfully upload and return the file to view. However, the content type is always application/octet-stream except for txt.
String contentType = new MimetypesFileTypeMap().getContentType(filename);
System.out.println("contenttype for " + filename + ": "+contentType);I created mime.types in my META-INF for tomcat and populated it, but it doesn't change anything. Uploading an mp3 should return the audio/mpeg3 I have in mime.types:
audio/mpeg3                         mp3
I verified that it is in /wtpwebapps/MyApp/META-INF/
My web.xml even has it:
    <mime-mapping>
        <extension>mp3</extension>
        <mime-type>audio/mpeg3</mime-type>
    </mime-mapping>Am I missing something?

Darn it. The form gobbled up my mimeTypes.rdf code. Here it is again with the GT and LT symbols replaced with '+':
+RDF:li RDF:resource="urn:mimetype:application/pdf2"/+
+RDF:Description RDF:about="urn:mimetype:application/pdf2"
NC:fileExtensions="pdf"
NC:description="TonyTest PDF document"
NC:value="application/pdf2"
NC:editable="true"+
+NC:handlerProp RDF:resource="urn:mimetype:handler:application/pdf2"/+
+/RDF:Description+
+RDF:Description RDF:about="urn:mimetype:handler:application/pdf2"
NC:alwaysAsk="true"
NC:saveToDisk="false"
NC:useSystemDefault="false"
NC:handleInternal="false"+
+NC:externalApplication RDF:resource="urn:mimetype:externalApplication:application/pdf2"/+
+/RDF:Description+
+RDF:Description RDF:about="urn:mimetype:externalApplication:application/pdf2"
NC:path="/usr/bin/acroread"
NC:prettyName="acroread" /+

Similar Messages

  • Attachments (word docs and PDFs) to emails can not be opened by the receivers. Are received as .dat files or application/octet-stream

    Attachments I add to emails (word doc or PDFs) can not be opened by the email receivers. Word documents attachments are received with ATT00427.dat (application/octet-stream) or .doc with (application/octet-stream). PDF attached files arrive with .pdf (application/octet-stream). My copy of my sent email has the same attachment extensions.
    == This happened ==
    Every time Firefox opened

    Firefox doesn't do email, it's a web browser.
    If you are using Firefox to access web mail, you need to seek support from your service provider or a forum for that service.
    If your problem is with Thunderbird, see this forum for support.
    [http://www.mozillamessaging.com/en-US/support/]
    or this one
    [http://forums.mozillazine.org/viewforum.php?f=39]

  • How get Mime Types of File/image

    I would like to get the MIME type all image/files inside a
    folder

    http://techfeed.net/blog/index.cfm/2007/3/16/Discover-MIME-type-in-ColdFusion
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • Inbound Email Attachments with MIME type of application/octet-stream

    I'm hoping someone can help me here. I'm trying to start a BPEL process via email. The email can consist of no attachments or multiple attachments. All the attachments should be text, e.g. XML, CSV, etc.
    Where I have got to is receiving the email and writing the attachments to variables. All is fine until I get an attachment that has a MIME type of application/octet-stream. I would only expect to see this for files that are not text based.
    Does anyon know how I can inturpret this type so I can extract the text? In this example both files are text based although only the first file is displayed.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <mailMessage xmlns="http://services.oracle.com/bpel/mail">
    - <from>
    <email>[email protected]</email>
    <displayName>James</displayName>
    </from>
    - <to>
    - <address>
    <email>j@james</email>
    <displayName>James</displayName>
    </address>
    </to>
    - <replyTo>
    <email>[email protected]</email>
    <displayName>James</displayName>
    </replyTo>
    <subject>RE: test</subject>
    <sentDate>2007-05-02T11:19:37.000+12:00</sentDate>
    <contentType>multipart/mixed; boundary="----_=_NextPart_001_01C78C47.6040C3F0"</contentType>
    - <content>
    - <multiPart>
    - <bodyPart>
    <contentType>text/plain; charset="iso-8859-1"</contentType>
    <content>________________________________ From: James [mailto:[email protected]] Sent: Tue 1/05/2007 3:05 PM To: James Subject: test</content>
    </bodyPart>
    - <bodyPart>
    <contentType>text/plain; name="create_MODS_schema.sql"</contentType>
    <content>CREATE USER TOLLBPEL IDENTIFIED BY VALUES 'TOLLBPEL' DEFAULT TABLESPACE APPS_TS_MODS_DATA TEMPORARY TABLESPACE TEMP PROFILE DEFAULT ACCOUNT UNLOCK; GRANT ANALYZE ANY TO MODS; GRANT CREATE TYPE TO MODS; GRANT CREATE TABLE TO MODS; GRANT ALTER SESSION TO MODS; GRANT QUERY REWRITE TO MODS; GRANT CREATE CLUSTER TO MODS; GRANT CREATE SESSION TO MODS; GRANT CREATE TRIGGER TO MODS; GRANT CREATE SEQUENCE TO MODS; GRANT CREATE SNAPSHOT TO MODS; GRANT DROP ANY OUTLINE TO MODS; GRANT ALTER ANY OUTLINE TO MODS; GRANT CREATE ANY OUTLINE TO MODS; GRANT CREATE DATABASE LINK TO MODS; GRANT CREATE PROCEDURE to MODS; ALTER USER MODS QUOTA UNLIMITED ON APPS_TS_MODS_DATA; ALTER USER MODS QUOTA UNLIMITED ON APPS_TS_MODS_IDX;</content>
    <bodyPartName>create_MODS_schema.sql</bodyPartName>
    </bodyPart>
    - <bodyPart>
    <contentType>application/octet-stream; name="citup.log"</contentType>
    <content>W0luc3RhbGxTaGllbGQgU2lsZW50XQ0KVmVyc2lvbj12NS4wMC4wMDANCkZpbGU9TG9nIEZpbGUNCltSZXNwb25zZVJlc3VsdF0NClJlc3VsdENvZGU9LTEyDQo=</content>
    </bodyPart>
    </multiPart>
    </content>
    </mailMessage>
    Any help will be appreciated.
    cheers
    James

    I'm hoping someone can help me here. I'm trying to start a BPEL process via email. The email can consist of no attachments or multiple attachments. All the attachments should be text, e.g. XML, CSV, etc.
    Where I have got to is receiving the email and writing the attachments to variables. All is fine until I get an attachment that has a MIME type of application/octet-stream. I would only expect to see this for files that are not text based.
    Does anyon know how I can inturpret this type so I can extract the text? In this example both files are text based although only the first file is displayed.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <mailMessage xmlns="http://services.oracle.com/bpel/mail">
    - <from>
    <email>[email protected]</email>
    <displayName>James</displayName>
    </from>
    - <to>
    - <address>
    <email>j@james</email>
    <displayName>James</displayName>
    </address>
    </to>
    - <replyTo>
    <email>[email protected]</email>
    <displayName>James</displayName>
    </replyTo>
    <subject>RE: test</subject>
    <sentDate>2007-05-02T11:19:37.000+12:00</sentDate>
    <contentType>multipart/mixed; boundary="----_=_NextPart_001_01C78C47.6040C3F0"</contentType>
    - <content>
    - <multiPart>
    - <bodyPart>
    <contentType>text/plain; charset="iso-8859-1"</contentType>
    <content>________________________________ From: James [mailto:[email protected]] Sent: Tue 1/05/2007 3:05 PM To: James Subject: test</content>
    </bodyPart>
    - <bodyPart>
    <contentType>text/plain; name="create_MODS_schema.sql"</contentType>
    <content>CREATE USER TOLLBPEL IDENTIFIED BY VALUES 'TOLLBPEL' DEFAULT TABLESPACE APPS_TS_MODS_DATA TEMPORARY TABLESPACE TEMP PROFILE DEFAULT ACCOUNT UNLOCK; GRANT ANALYZE ANY TO MODS; GRANT CREATE TYPE TO MODS; GRANT CREATE TABLE TO MODS; GRANT ALTER SESSION TO MODS; GRANT QUERY REWRITE TO MODS; GRANT CREATE CLUSTER TO MODS; GRANT CREATE SESSION TO MODS; GRANT CREATE TRIGGER TO MODS; GRANT CREATE SEQUENCE TO MODS; GRANT CREATE SNAPSHOT TO MODS; GRANT DROP ANY OUTLINE TO MODS; GRANT ALTER ANY OUTLINE TO MODS; GRANT CREATE ANY OUTLINE TO MODS; GRANT CREATE DATABASE LINK TO MODS; GRANT CREATE PROCEDURE to MODS; ALTER USER MODS QUOTA UNLIMITED ON APPS_TS_MODS_DATA; ALTER USER MODS QUOTA UNLIMITED ON APPS_TS_MODS_IDX;</content>
    <bodyPartName>create_MODS_schema.sql</bodyPartName>
    </bodyPart>
    - <bodyPart>
    <contentType>application/octet-stream; name="citup.log"</contentType>
    <content>W0luc3RhbGxTaGllbGQgU2lsZW50XQ0KVmVyc2lvbj12NS4wMC4wMDANCkZpbGU9TG9nIEZpbGUNCltSZXNwb25zZVJlc3VsdF0NClJlc3VsdENvZGU9LTEyDQo=</content>
    </bodyPart>
    </multiPart>
    </content>
    </mailMessage>
    Any help will be appreciated.
    cheers
    James

  • Mime Types : application/octet-stream

    When using CFFILE, I am allowing "text/xml". Client is saving
    MS Excel as XML. Many test done and has worked until today when the
    error started occuring that the MIME type is not accepted. I do
    understand that the "application/octet-stream" MIME type is
    generated (sometimes) when a file is viewed or save in a word
    process or spreadsheet application.
    The question is ... are there security concerns if I allow
    "application/octet-stream" MIME type to be uploaded to the server?
    Any thoughts or conerns would be appreciated.
    -jb

    The MIME type is provided by the client browser. Is the
    browser posting an XML file and sending the MIME type as
    pplication/octet-stream instead of text/xml? In Windows/Internet
    Explorer MIME types and extensions are associated by a registry
    entry. If you have access to the client's PC you may wish to check
    this.
    If you allow application/octet-stream you are opening
    yourself up. I also recommend you check file extensions and only
    accept uploads from trusted sources.

  • Acrobat 7.1 IE plugin cannot open .pdf Files with mt/application/octet-stream

    Hi Folks,
    we have some problems to open pdf - files via Hyperlink in an IE Explorer. this files get from the web-server the MIME-Type "octet-stream".
    the only option is to save and then open the pdf files. But we want to open the pdf files directly IN the IE. the option to open it not in IE is not possible because then another application will not work.
    Is it generally possible to open an pdf File with an octet-stream MIME-Type with the IE-Pluin, and if Yes is ther any possible configuration we could try.
    Thanks for your help
    regards
    Felix

    Hi Bill,
    we already tried to change that checkbox that solves the problem but we get new problems with other applications, so this way is also no option for us.
    also we tried to repair / reinstall acrobat, but it has no effect.
    I suppose that maybe adobe just closed that door to open pdf documents with the octet-stream MIME-Type. Because it could an way to insert executable files in the system.
    maybe a higher version than 7.1 can do this?
    Thanks for your help, here in Germany it is already 2 pm so not far from quitting-time ;)

  • Automatically open file based on MIME type and file extension

    We have an app that is registered to handle custom MIME type and file extension. This works perfectly on IE and FireFox causing them to download the file to a temp folder and then launch our app associated with MIME type and file extension with command line to the downloaded file. On Safari however this does not work. It opens up a download window and shows that it has downloaded the file with no option to open it.

    hello, you can file a bug on bugzilla.mozilla.org if you want to include your plugin in the plugin finder service...
    [https://wiki.mozilla.org/PFS]

  • When I save a pages document as a pdf and then try to email the document, it loads as an application octet-stream dat file instead of a pdf. What's happening?

    When I save a Pages document as a pdf and then try to email the document, it loads as an application octet-stream dat file instead of a pdf and recipients can't open it. Some load correctly, but about half don't load as a pdf. What's happening?

    Hi mjmonck-
    Which email provider are you using? There are different solutions possible for different providers. Yahoo is having trouble with attachments, outside of any Firefox issue. I've seen a Google user fix this by manually adding the mail URL to their ad block program- which mistakenly perceived the webmail page as an advertisement.
    Hope this helps.

  • Every time I log onto a new site i get the following popup:Content [application/octet-stream] found Do you want to download it to C:\Users\kathy\ ? ... Can someone please tell me what this is and how do I stop this!

    Content [application/octet-stream] found
    Do you want to download it to C:\Users\kathy\ ?
    '''bold text'''

    Back up all data.
    Check the Mail, Contacts & Calendar preference pane to make sure you're not synchronizing Notes in more than one account.
    If you're not, disable Notes synchronization temporarily.
    Quit Notes, if it's running.
    Triple-click the line below to select it:
    ~/Library/Containers/com.apple.Notes
    Copy the whole line of text to the Clipboard (command-C).
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar. Paste into the box that opens (command-V), then press return. A Finder window should open with a folder selected. If it does, move the selected folder — not just its contents — to the Desktop.
    The folder you're moving is named "com.apple.Notes" It is not the subfolder named "Data" or anything else.
    Re-enable Notes synchronization.
    Relaunch Notes and test. If it works now, delete the folder you moved. Otherwise, quit again, and put the folder back where it was, overwriting the one that may have been created in its place.
    Caution: If you delete some or all of the contents of the selected folder, but leave the folder itself in place, the application may not launch. Deleting the folder will cause it to be rebuilt automatically.

  • When I automate my application using selenium on firefox, Firefox gives a pop-up of "application/octet-stream".

    I am automating a web application using Selenium. When I run my Selenium scripts through Selenium RC on firefox, Firefox does not invoke the application's URL and throws a pop-up:
    You have chosen to open
    which is a: application/octet-stream
    from: http://application url...
    what should firefox do with this file?
    Open
    Save.
    If I open the same URL manually, by entering the url in browser's url bar, it gets opened properly.
    Please suggest, if any setting needs to be changed in my browser.
    I am using:
    Win XP and FF 3.6.12

    http://support.mozilla.com/en-US/kb/Changing+the+e-mail+program+used+by+Firefox
    Comcast online email is considered '''web mail''' so you need to scroll down that support page to the web mail section.

  • You have chosen to open which is a: application/octet-stream error

    I have been getting his error for a very long time now:
    you have chosen to open (web address here) which is a: application/octet-stream ehat should firefox do with this file? open - save
    i got this from firefox 3, i tried completely uninstalling it, and then reinstalling it
    and the same thing happens in firefox 4, which i just uninstalled firefox 3 and did a clean install of firefox 4
    it happens randomly and periodically, it seems each new session resets the warnings, and when i click on about 35% of the websites in my speeddial, it will load that warning and a blank tab, after i click the speeddial again, it will work for that site, for the rest of the session..
    it seems completely random, sometimes its google.com, sometimes mozilla.com, it could really be anything..
    it could be a website in my speeddial, but it also happens sometimes when typing from the address bar
    i have done extensive spyware sweeps, and antivirus sweeps for anything out of the ordinary, and i even repaired Windows XP SP2, and then I even upgraded to Windows XP SP3, i have all the updates, etc..
    I have 2 computers on this network, and they both do it.
    its really driving me crazy.. i even thoght about wiping my entire hard drive and reinstalling XP, but i dont want to do that
    i tried IE8, but i hated the lack of speedials and tab options
    and I tried Opera but i hated the fact that there were no multiple speedial tabs
    and im not fond of chrome or safari for similar reasons..
    i've tried a few things i've found online, but nothing really applies to this problem
    does anyone have any idea how to fix this so i can keep using firefox?
    thanks

    Show us the output of
    emctl status dbconsoleMost of the times, EM stops with DGCP being enabled on the system after the db's creation. I faced alot of it just 2 days ago when 2 of my boxes stopped EM. So show us the output of the above command and to have an idea of basic EM troubleshooting, read this,
    http://oracle-base.com/articles/misc/BasicEnterpriseManagerTroubleshooting.php
    HTH
    Aman....

  • I had to replace the hard drive on my computer.  I am now trying to download Adobe Photoshop CS6, previously purchased.  I get an error that files are missing after waiting for the whole download.  I have Windows7

    I had to replace the hard drive on my computer.  I am now trying to download Adobe Photoshop CS6, previously purchased.  I get an error that files are missing after waiting for the whole download.  I have Windows7

    The error msg said that the file archive part of Adobe photoshop CS6 is missing and that I need all parts in the same folder.

  • HT1338 I have Microsoft Word for Apple, and when I send an attachment to an email, it goes as  "application/octet-stream", and no one can open it. What can I do to send it as an ordinary word.doc

    I have Microsoft Word for Apple, and when I send an attachment to an email, it goes as  "application/octet-stream", and no one can open it. What can I do to send it as an ordinary word.doc>

    You could Zip it.
     Cheers, Tom

  • I can't get my password manager working. It remembers passwords for websites but when I enter in a new password (because this had to be changed) or when I have a new username + PW that I wish to save, the password manager does not appear.

    I can't get my password manager working. It remembers passwords for websites but when I enter in a new password (because this had to be changed) or when I have a new username + PW that I wish to save, the password manager does not appear.

    If you updated your existing account then try logging out of it on the iPhone by tapping on the id in Settings > iTunes & App Stores and then log back in and see if that 'refreshes' the account on the iPad.
    If you created a new account then you can log out of the old account and in with the new one as above, but any content that you purchased/downloaded via the old account will remain tied to that old account, and only that old account can re-download its content and download updates to its apps.

  • Is one application pool preferred for all sharepoint service applications(

    is one application pool preferred for all SharePoint service applications ? 
    I have a three-tier architected SP 2013 small farm (NLT, 2 wfe, 1 app server, 1 db server). All services will be use (Secure Store,Service Application, Managed Metadata Service Application, Search Service Application,User Profile Service Application,App
    Management Service Application,Workflow Manager,Excel Service Application,BI Reporting Service Application,Power Pivot Service,Performance Point,Visio Services,BCS Service application)
    I am unclear on the following:
    which servers should host which service ? and why ?
    Is one application pool account preferred for all SP service Applications ? if not which service applications should be logically group ? and why ?

    Creating additional application pools requires more RAM memory.  About 100-150 MB per app pool.  But it also keeps things happening in one app pool from affecting another.  So normally you create additional app pools when you want to maintain
    higher service levels on one component versus another.  For example.  Let's assume that your service levels designate that you could survive a 3 hour outage of Search but that Managed metadata must be constantly available with minimal downtime.  Then
    you would put Search and MMS in separate App Pools.  Otherwise there is no real advantage to splitting them up.
    Services that are accessed directly by user request, like Search Query, Managed metadata, user profile should go on the Web Front ends.  Services that process heavier intermittent loads are normally placed on a dedicated application server to keep them
    from affecting overall performance, for example Excel Services.  But its more of an art form rather than a science and depends a lot on your performance needs, your hardware, and your usage.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

Maybe you are looking for

  • Rotten at the Core

    Hi all, I think I've messed with some files, so my computer now is without my desktop image (instead it is of a full grey), and it is without menubar icons (such as wifi, bt, eject, spotlight etc). Probably Core Services are not being launched? Is th

  • How do I eliminate the new Facebook "timeline" and go back to the original format

    how can I get rid of the new "timeline" on Facebook, and go back to the original format ? I was told how to do it in Chrome, and it worked, but I prefer to us FIREFOX. thanks I am using the newest Firefox and running Windows 7

  • Where are my missing albums

    I spent two weeks of sick leave from work creating a website using iWeb, I had been putting it off for ages. I bought a domain and figured out how to link it all by myself, for which I am very proud of. I have passed out my new website address to all

  • Oracle Client 9.2.0

    Hi, Where can I just download Oracle Client 9.2.0 and Install it ? Thank you.

  • Stand by database

    Hi guys, OS: Windows Server 2003 (32 bit) DB Version: 10.2.0.3 Question: Simple question I guess but still I'm failing to understand the logic. Will the changes applied on the primary database also occur in the stand-by, for instance if I delete a ta