MIME-type issue???

I have installed WLS 6.1 and have placed my index.html file in the
applications/DefaultWebApp_myserver. Everything works fine. For
organizational purposes, I want to place all of my documentation in
DefaultWebApp_myserver/doc. When I display a MS Word document (IE 6),
within the /doc subfolder, the document displays as ascii text. However, if
I place the document in the DefaultWebApp_myserver folder, it displays
correctly as a Word document.
Additionally, Excel (xls) documents display as ascii/text regardless of
their location.
Any ideas or suggestions would be greatly appreciated.
Thanks
Jed Zimmer

Kumar,
I've tried all combinations of the following with no luck:
Extensions:
<extension>.doc</extension>
<extension>doc</extension>
<extension>DOC</extension>
MIME-types:
<mime-type>application/winword</mime-type>
<mime-type>application/msword</mime-type>
<mime-type>application/ms-word</mime-type>
I restarted the web server after clicking the "persist" button from the web
descriptor page. My directory structure is as follows:
Root location: .../mydomain/applications/DefaultWebApp_myserver
Doc location: .../mydomain/applications/DefaultWebApp_myserver/doc
Location of web.xml:
.../mydomain/applications/DefaultWebApp_myserver/WEB-INF
Once again, viewing a Word document, located in the root location, works
fine. Viewing a Word document in the /doc subdirectory displays as ascii
text.
Thanks again for your help.
Jed Zimmer
"Kumar Allamraju" <[email protected]> wrote in message
news:[email protected]..
you should define the following mime-type in your web.xml
<mime-mapping>
<extension>doc</extension>
<mime-type>application/ms-word</mime-type>
</mime-mapping>
Kumar
Jed Zimmer wrote:
I have installed WLS 6.1 and have placed my index.html file in the
applications/DefaultWebApp_myserver. Everything works fine. For
organizational purposes, I want to place all of my documentation in
DefaultWebApp_myserver/doc. When I display a MS Word document (IE 6),
within the /doc subfolder, the document displays as ascii text.
However, if
I place the document in the DefaultWebApp_myserver folder, it displays
correctly as a Word document.
Additionally, Excel (xls) documents display as ascii/text regardless of
their location.
Any ideas or suggestions would be greatly appreciated.
Thanks
Jed Zimmer

Similar Messages

  • MIME type issue in version 4.1/4.2 Compatibility Mode

    Problem: when displaying a PDF file, it displays OK as PDF if APEX 'Compatability Mode' = 'Pre 4.1', but displays as HTML when in either '4.1' or '4.2' mode.
    Apex: 4.2.2.00.11
    DB: 11gr2
    Web server: Apache on Linux
    More detailed description... this seems to be a MIME type issue related to APEX (or maybe DB) versioning.  The following code works as expected when run in 'Pre 4.1' mode - ie. it displays an appropriate PDF document in the appropriate Acrobat/other plugin in several browsers (Firefox/Opera/Chrome/IE).  But just by changing 'Compatability Mode' to '4.2' (or even '4.1'), it then downloads the file but displays it as a bunch of random characters, and the web page header MIME type is 'text/HTML'.
    Note: this also happens with other file types such as xls/doc/etc, but I expect fixing PDF should also fix these.
    I'm at a bit of a loss as to where this is happening, it seems there is a difference in the 'Compatibility Modes' between either the creating of the HTML header using 'OWA_UTIL.mime_header' or the component path it traverses before reaching apache.
    The only other thing I could think of is that we do a bit of redirection to display the PDF, though this seems like it might be a red herring.  Basically we use page 560 as a container, and then display the PDF with page 561 within a frame embeded within page 560.  So, on the page 560, which is the one we reference throughout the application, we have  a region with a source of '&lt;iframe src=?p=&APP_ID.:561:&SESSION.height="500" width="700"&gt&lt;/iframe&gt</pre>'.  Then on page 561, in a 'On Load - Before Header' process, we make the call to the code 'DOWNLOAD_APPLICANT_PDF' (below).
    Note: I did try calling 'apex_application.stop_apex_engine' after 'DOWNLOAD_APPLICANT_PDF', as suggested in a couple threads, but it didn't fix the problem, and caused a couple low-level system errors.
    Code:
    <pre>
      CREATE OR REPLACE PROCEDURE DOWNLOAD_APPLICANT_PDF ( p_doc_id IN   NUMBER
       AS
          v_length      NUMBER;
          lob_loc       BLOB;
          l_display_inline   CHAR := '1';
       BEGIN
          SELECT pdf_data, DBMS_LOB.getlength (pdf_data)
            INTO lob_loc, v_length
            FROM pdf_dest
           WHERE pdf_dest_id = p_doc_id;
          OWA_UTIL.mime_header ('application/pdf', FALSE);
          HTP.p ('Content-length: ' || v_length);
          HTP.p ('Content-Disposition:inline;filename="mydoc.pdf"');
          OWA_UTIL.http_header_close;
          WPG_DOCLOAD.download_file (lob_loc);
    END;
    </pre>

    Hi,
    for some background information about the above changed behavior, have a look at 4.2 Before Header Processes and Browser Security HTTP Headers of the APEX 4.1. release notes.
    Regards
    Patrick
    Member of the APEX development team
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Mime Type issue with .docx Files in Apex 4.0

    We are having issues with windows 2007 .docx documents that are when they are viewed on windows 2007 machines with ie8. If I look in the storage table the mime type is not set correctly. It is being set as application/octet-stream. When we download the file one windows 7/IE8 either the browser thinks it is a zip file or it does not recognize it.
    If I go into the back end and update the table with the correct mime type application/vnd.openxmlformats-officedocument.wordprocessingml.document it works fine.
    We have tried to update mime types on the apache server but this does not help.
    Apex seems to be deciding what mime type to populate the table with.
    It seems like I need to update apex somehow to recognize that a .docx extension should be stored as type mime type application/vnd.openxmlformats-officedocument.wordprocessingml.document.
    Does anyone know how I would do this?
    We are running Apex 4 on 10g IAS with mod/plsql
    are application is setup very similar to what is describe in this document by David Peak
    http://www.oracle.com/technetwork/issue-archive/2009/09-jan/o19browser-087025.html
    Edited by: user7660930 on Apr 18, 2011 7:40 AM

    I thought about trying to do something similar to the code above but would prefer that apex would work properly.
    I created a page with the sql region and added this code
    owa_util.print_CGI_ENV
    when I run it it shows the following environment variables. It look like the WebDB environment HTTP_ACCEPT value needs to be updated. Does any one know how to update this information on a 10gIAS server and were it is stored? I have some documenation on WebDB but none of it seems to point to the correct location of the files and there are no admin pages
    PLSQL_GATEWAY = WebDb
    GATEWAY_IVERSION = 2
    SERVER_SOFTWARE = Oracle-Application-Server-10g/10.1.2.2.0 Oracle-HTTP-Server
    GATEWAY_INTERFACE = CGI/1.1
    SERVER_PORT = 4445
    SERVER_NAME = admsunxapp04.ad.jocoks.com
    REQUEST_METHOD = GET
    QUERY_STRING = p=301:1:3167922978599440:::::
    PATH_INFO = /f
    SCRIPT_NAME = /pls/apex/sand
    REMOTE_ADDR = 172.16.14.100
    SERVER_PROTOCOL = HTTP/1.1
    REQUEST_PROTOCOL = HTTPS
    REMOTE_USER = APEX_PUBLIC_USER
    HTTP_USER_AGENT = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; Tablet PC 2.0)
    HTTP_HOST = admsunxapp04.ad.jocoks.com:4445
    HTTP_ACCEPT = image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
    HTTP_ACCEPT_ENCODING = gzip, deflate
    HTTP_ACCEPT_LANGUAGE = en-US
    HTTP_ORACLE_ECID = 1303315270:172.16.2.9:3032:0:2526,0
    WEB_AUTHENT_PREFIX =
    DAD_NAME = apex/sand
    DOC_ACCESS_PATH = docs
    DOCUMENT_TABLE = wwv_flow_file_objects$
    PATH_ALIAS =
    REQUEST_CHARSET = AL32UTF8
    REQUEST_IANA_CHARSET = UTF-8
    SCRIPT_PREFIX = /pls
    HTTP_COOKIE = ORA_WWV_R1=%23ALL; ORA_WWV_R2=%23ALL; ORA_WWV_R3=%23ALL; ORA_WWV_ATTRIBUTE_PAGE=4651%2C%23ALL; ORA_WWV_REMEMBER_UN=ADMIN:apex_app; ORA_WWV_USER=8A32E6579024A4F4; oracle.uix=0^^GMT-5:00; DEVL=WaSkGBNfJ6-Vgpw-6HXpHvM8:S

  • Ristretto or maybe generic mime.types issue: case of file extension?

    Good day.
    Ristretto (the XFCE image viewer) wouldn't recognize the .TIF files I copied over from a Windows partition until I renamed them to .tif. Lowercase .tiff and .tif are indeed the only two file extensions that are mentioned for image/tiff in /etc/mime.types but I thought this was somewhat unexpected (and unwanted).
    Is it a per-app decision whether or not to do case-sensitive extension compares? Is it a problem? And if so, in mime.types or in ristretto?
    Regards,
    Rene

    Hi,
    for some background information about the above changed behavior, have a look at 4.2 Before Header Processes and Browser Security HTTP Headers of the APEX 4.1. release notes.
    Regards
    Patrick
    Member of the APEX development team
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Mime type issues: x-directory/normal vs. inode/directory

    Sorry for the long post. If you have no time, just read the third paragraph, starting with "Of course..."
    I am using KDE and I have a problem with the mime types for directories. As Gnome, too, KDE manages mime types itself to offer easy customizability by means of GUIs. Obviously, KDE programs natively adhere to these settings. When a non-KDE application wants to open a file of a certain mime type, it should call "xdg-open" which checks for the desktop environment and the calls the "kde-open" script to use KDE's own mime type hierarchy. However, when a program does not call "xdg-open", the (by now ancient) /usr/share/applications/mimeinfo.cache is read. This file is created by /usr/bin/update-desktop-database, which is executed in many PKGBUILDs (well, actually the .install files) to update mime information after installation.
    The problem I am running into is that Zotero, a Firefox extension for bibliography management, does not open Dolphin, KDE's file manager, but EasyTag, a music file ID tag editor whenever a folder is supposed to be opened. A quick look at /usr/share/applications/mimeinfo.cache shows that Dolphin is registered as an application for the mime type "inode/directory", but not for "x-directory/normal", for which EasyTag is registered. Simply adding Dolphin as the first app in the array for "x-directory/normal" solves the problem, but only until the next update of a program calling /usr/bin/update-desktop-database. I thus wrote an alias command to call a selfmade script which uses sed to rectify this after each call of update-desktop-database.
    Of course, this is not a nice solution. Thus my question (Google didn't help much): What is the standard mime type for directories? AFAICT, it should be "inode/directory", but what, then, does "x-directory/normal" do and why is it used? What should the solution be? Should Dolphin register the additional mime type?
    I suspect an error on behalf of the KDE devs as I just realized that a few other KDE programs don't claim certain mime types, either: Okular does not claim "application/pdf". The GIMP, however, does, even though it cannot handle this mime type.
    Thanks for your patience.

    skottish wrote:You can override the system level mimeinfo.cache with your own copy in ~/.local/share/applications. Only put in the stuff that you want; There's need to copy the whole file.
    An even better workaround. Nice!
    skottish wrote:Slightly off topic, but GIMP can open PDF files.
    Not here: "Opening '/home/user/test.pdf' failed: Unknown file type"
    Last edited by mutlu_inek (2009-08-08 21:49:37)

  • CLM Mail MIME Type Issue

    Users are entering special characters in the instructions to the signatory, and when the string is picked up into the custom email, the system is mis-translating the characters in the CLM.We suspect on the custom java mail util not setting up the MIME Type.
    Any help would advise on this

    In custom email, you manually set the content type. Here is an example:
    msg.setContent(txt,"text/html");
    where txt is the formatted string.
    and msg is of type MimeMessage.
    Incase you are using the method "setText", change it as shown above and it should work fine
    Regards,
    Immanuel

  • Servlet application MIME type browser window issue

    Hi,
    I am writing a servlet that launches an application on a citrix server and as such the MIME type is as below:
    response.setContentType("application/x-ica");
    The user is supposed to click an internet explorer link on their desktop and the application will open, however currently a browser window opens and remains blank while the application launches and does not close until done so manually. I have seen examples where users can click a link and the browser window closes itself straight away, and the application continues to launch.
    Can anyone advise how to correct this problem?
    Thanks.

    I've found out what the problem was, wasn't related to the servlet itself it was a client side custom component making multiple requests, which the app replied to with different content types.
    Thanks.

  • When I try to click on a download link for a .pdf file Firefox does not recognize the MIME type and tries to download the file as "index.php"

    When visiting a site I frequent I tried to download a linked .pdf file. Previously I've used Firefox 7.0.1 to download the link with no problem. Using Firefox 8 however I the browser does not recognize the .pdf link's mime type. Instead of recognizing the download link as a .pdf file Firefox 8 tries to download it as "index.php". Firefox 8 does this with .doc files and .txt files as well. When I downgrade to 7.0.1 again the problem disappears.

    Hi hakmacpace,
    I'd try starting Firefox in [[Safe Mode]]. If you don't have the issue while all of your add-ons, extensions, and themes are disabled, you can try adding them back in one by one until you find the culprit. You should look at the [https://support.mozilla.org/en-US/kb/Troubleshooting-extensions-themes Extensions and Themes troubleshooting guide ] and the [[Troubleshooting plugins]] article as well.
    You could also try [https://support.mozilla.org/en-US/kb/Managing-profiles?s=create+a+new+profile&r=2&e=es&as=s#w_creating-a-profile Creating a new profile].
    Hopefully this helps!

  • Quicktime MIME types translated in non-english versions

    In the continuation of a previous thread, there seems to be a problem with the last quicktime update that translated mime types's names (and using chars like "í" and "á), in non-english versions of quicktime and macosx (in my case, portuguese versions), that might conflict with browsers like firefox, preventing them from opening embed vídeos. For example, i have MIME types with names like "aplicação/x-rstp" and "áudio/x-mp3" which are causing several issues. How can I change them back to english and solve this problem?
    Thanks in advance.

    No one?

  • How to determine mime-type of a file using OSB

    I was working on a requirement where in it requires to use FILE/ FTP adapters using OSB or BPEL as solution. The idea is to pick up files from one location to another location for certain legacy platforms. The real issue is, someone can put a JPEG file in the upload/download location(s), merely by changing the extensions. When this happens the systems will not process since the mime-type is incorrect.
    I know of an open-source API (Apache-Tikka) to determine the mime-types, but then if we use open-source why would customer buy from us.
    The intention is to pick-up the file and simply pass-it (and not parse) on to next system using File or FTP adapter, but in the process, cross check the MIME-TYPE before doing so.
    Any solution using Oracle Service Bus or BPEL would help

    HI Birender,
    Kindly go through the metalink doc for processsing jpeg/xml/pdf etc any atachement using bpel :Understanding XPATH functions for processing MIME attachments with BPEL PM in SOA Suite 11gR1 [ID 1272093.1]
    Regrds,
    olety

  • .htaccess and MIME types not working in 3.1

    anyone else noticed that when using a .htaccess file to determine certain mime types safari 3 ignores the .htaccess file and handles the file the way the OS would normally?
    i'm hosting a bunch of 1080p .mov's and I'd prefer if they would just download when clicked on instead of trying to open in a window where they go out of frame.
    i've currently got the addtype set to octetstream, and on safari 2 and firefox they both automatically start to download, but safari 3 tries to open the movie in the browser window.

    I think that it is interesting to note that as I peruse the various threads dealing with 3.1 update problems the majority of complaints seem to be coming from iPhone/Mac combos; based, at least, on the posters signiture.
    For my part, 64bit vista win machine and 3Gs, the update could not have been soother and the phone works better then it did; no app problems, better wi-fi conectivity, faster loading of apps and files.
    I have had, though, considerable problems with Outlook sync, contacts sync and MM sync (enough so that I turned off MM except for iDisk); but most of these are known issues so just need to with it out.
    Seems like Apple could have workedd this stuff out before hand, though.

  • Safari cannot find the Internet plug-in (MIME type...x-shockwave-flash)

    Well, YouTube and other flash sites worked fine just until today. So I get this message :
    +The page “YouTube - Meet Single File” has content of MIME type “application/x-shockwave-flash”. Because you don’t have a plug-in installed for this MIME type, this content can’t be displayed.+
    I've already tried Disk Repair to repair the permissions, installed, re-installed Flash Player and Shockwave Player and nothing yet. System preferences with QuickTime Advanced Panel to enable flash and the other miscelaneous one I unchecked, the normal procedure, I guess. Also checked the libraries to see if I didn't have the plugin in two libraries, but i'm not sure about the library/plugin issue.
    Any help is much appreciated.
    Best Regards,
    Kinetick

    I actually don't get any error message at all. The Q is greyed out and a large ? in center of it and nothing works in Safari. I get the same non-message wherever I go that has QT. I have tried some of the fixes that have worked for other people but nothing works so far. I tossed the webplugin into the trash and restarted Safari. I repaired permissions. I looked at the plug-ins list in help but that was only confusing since I don't have a clue what any of those control. Getting frustrated and have spent a couple of hours trying to fix this.

  • (261705413) Q RPCC-21 Missing text/xml MIME-type for WSDL files?

    Q<RPCC-21> Would it mess up the SOAP operations that clients do when using the
    WSDL in a dynamic client to put a text/xml mime type in the WSDL-providing jsp?
    A<RPCC-21>: It is a known issue that the MIME-type for WSDL files is not appropriately
    transmitted so some web browsers will not identify an appropriate helper application
    when they are viewed (for Netscape just press Ctrl-U to view the source). This,
    however, does not affect the dynamic client as evidenced by the example code seen
    in the code demonstration.
    Adam

    SR,
    You probably already have the answer by now, but I just came across the same problem and found the answer elsewhere.
    The trick is to have the JavaMail jar in your classpath BEFORE the JAF jar. Given the habit of my development environment to sort jars alphabetifally it had me stumped for a bit.
    Good luck
    Marc

  • Mime type help required

    with following code
    response.setContentType("application/vnd.ms-excel");
    response.addHeader("Content-Disposition"," filename=OpportunityReport.xls");
    dialog shows download dialog with three buttons
    Open, Save, Cancel
    i want to show only
    Save and Cancel
    how to adjust mime type?

    That would have helped, I supposed :o)
    However, I've resolved the issue.

  • Content of MIME type "application/x-shockwave-flash"

    Hey, im not that advanced with this stuff but I keep on getting this message recently and I cannot remember any recent major downloads/updates:
    This page has content of MIME type “application/x-shockwave-flash”, but you don’t have a plug-in installed for this MIME type.
    This happens on Youtube, facebook and stuff like that. Also, Ive noticed that apple trailers using quicktime isnt working. I have installed the new plugins for flashplayer and Quicktime but still no result.
    Any help PLEASE? I hate using firefox coz i love safari!
    Cheers!
    Pratik

    Have you by any chance moved Safari from its proper place in the Applications Folder to a sub-folder, or renamed it?
    Try this routine:
    Repairing permissions is an important part of regular maintenance, and should always be carried out both before and after any software installation or update.
    Go to Disk Utility (this is in your Utilities Folder in your Application folder) and click on the icon of your hard disk (not the one with all the numbers).
    In First Aid, click on Repair Permissions.
    This only takes a minute or two.
    Background information here:
    http://docs.info.apple.com/article.html?artnum=25751
    and here:
    http://docs.info.apple.com/article.html?artnum=302672
    If you were having any serious problems with your Mac you might as well complete the exercise by repairing your hard disk as well. You cannot do this from the same start-up disk. Reboot from your install disk (holding down the C key). Once it opens, select your language, and then go to Disk Utility from the Utilities menu. Select your hard disk as before and click Repair.
    Once that is complete reboot again from your usual start-up disk.
    More useful reading here:
    Resolve startup issues and perform disk maintenance with Disk Utility and fsck
    http://support.apple.com/kb/TS1417

Maybe you are looking for