Mime type of mx:HTML

I can use {idHtmlTag.location} when I want to know the URL which is shown in an HTML-field. I searched a while how to find the mim-type of the HTML-field. but without results
How can I read the mim-type (text/xml or text/html) of the document shown in the HTML-field?

look to fm WWW_GET_MIME_OBJECT
and sample program RSDEMO_PICTURE_CONTROL
A.

Similar Messages

  • Print HTML using JPS API.. How to configure printer MIME-TYPE as text/html

    Hi All,
    I have to print the HTML pages.. for this i have used JPS API , but i found that my printer doesnt supoort Mime-type(Flavour) text/html.
    Can someone help me in this ...
    i) Can i configure my printer for this Mime-type , if yes then HOW?
    ii) Is there any work around ?
    Thank you all in advance :)

    I reposted this question in the Database forum. Admin can feel free to delete this thread.
    The answer is to add this at the top: htp.addDefaultHTMLHdr(false);
    Thanks,
    T.
    Edited by: 855677 on May 3, 2011 9:35 AM

  • 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

  • JSF1091: No mime type could be found for file xyz.png.

    Hi all,
    I get error logs in weblogic server like :
    <ExternalContextImpl> <getMimeType> JSF1091: No mime type could be found for file xyz.png. To resolve this, add a mime-type mapping to the applications web.xml.
    I get this for all the image files ... I found something :
    http://www.java2s.com/Code/JavaAPI/javax.servlet.http/webxmlmimemapping.htm
    <mime-mapping>
            <extension>java</extension>
            <mime-type>text/plain</mime-type>
    </mime-mapping>
    What should I add (mime-type) for png files ?
    Thanks..

    You use 'image/png' for this. Refer to MIME Types - Complete List » HTML Elements| Learn HTML | Tags | Tutorials | HTML Cheat Sheet for more info.
    Timo

  • Trying to Access SharePoint 2013 Rest Api in HTML page but getting Mime Type Exception with Status Success

    I am trying to invoke the SharePoint Rest Api using HTML page. I have included the Access Control Allow Origin to the web.config file. I am getting Readty State 4 and
    Status Success but still I am getting the below error.
    Refused to execute script from 'http://<server>/_api//web/lists?callback=jQuery172045857910416089_1430217181282&_=1430217363882' because its MIME
    type ('application/atom+xml') is not executable, and strict MIME type checking is enabled.
        <script>
            $(document).ready(function () {
                $("#KMPDiscussions").click(function () {
                    //$.support.cors = true;
                    $.ajax({
                        url: "http://<server>/_api//web/lists",
                        dataType: "jsonp",
                        type: "GET",
                        method: "GET",
                        contentType: "application/javascript",
                        headers: {
                            "content-type":
    "application/json;odata=verbose",
                            "accept": "application/json;odata=verbose",
                        success: function onSuccess(data) {
                            alert("Inside Alert");
                        error: function onError(data){
                            alert("Error: "
    + data);
        </script>
    It always hits the error on callback.
    Is there any other way that I can invoke SharePoint Rest Api from a Cross Domain. Please Help.

    Hi Chris,
    Thanks for the reply,Here iam using different files to be uploaded in library.
    please find the below snapshot of json response and ULS logs.
    12/22/2013 18:31:15.02 w3wp.exe (0x3338) 0x401C SharePoint Foundation Files 
    abq2i High Could not get DocumentContent row: 0x80004005. 79f7629c-4694-c026-
    3349-2049178ee919
    12/22/2013 18:31:15.02 w3wp.exe (0x3338) 0x401C SharePoint Foundation Files 
    aiv4w Medium Spent 0 ms to bind -1 byte file stream 79f7629c-4694-c026-3349-
    2049178ee919 
    12/22/2013 18:31:15.02 w3wp.exe (0x3338) 0x401C SharePoint Foundation Files 
    aise3 Medium Failure when fetching document. 0x80070012 79f7629c-4694-c026-
    3349-2049178ee919
    12/22/2013 18:31:15.39 w3wp.exe (0x3338) 0x0D4C SharePoint Foundation 
    Database ab1a9 High Failed to get document content data.
    System.ComponentModel.Win32Exception (0x80004005): Cannot complete this function     at
    Microsoft.SharePoint.SPSqlClient.GetDocumentContentRow(Int32 rowOrd, Object
    ospFileStmMgr, SPDocumentBindRequest& dbreq, SPDocumentBindResults& dbres) 
    79f7629c-76ab-c026-3349-2c9132b13e9a
    12/22/2013 18:31:15.39 w3wp.exe (0x3338) 0x4184 SharePoint Foundation 
    Database ab1a9 High Failed to get document content data.
    System.ComponentModel.Win32Exception (0x80004005): Cannot complete this function     at
    Microsoft.SharePoint.SPSqlClient.GetDocumentContentRow(Int32 rowOrd, Object
    ospFileStmMgr, SPDocumentBindRequest& dbreq, SPDocumentBindResults& dbres) 
    79f7629c-76ab-c026-3349-281167b6cd09
    Thanks again,
    Naresh.

  • [svn] 609: Changed the svn:mime-type of the SDK's milestones.html file.

    Revision: 609
    Author: [email protected]
    Date: 2008-02-21 14:47:48 -0800 (Thu, 21 Feb 2008)
    Log Message:
    Changed the svn:mime-type of the SDK's milestones.html file.
    Property Changed:
    flex/sdk/milestones.html

    the web xml mime type setting are for static files served by the server...
    if you print a file directly to the output of the servlet, you must set the mime type, so DO write :
    response.setContentType( "application/vnd.ms-excel" );
    IE "works fine" because it also uses the file extension to decide the mime type... but in the absolute, it's a wrong behaviour

  • MIME-TYPE is stored incorrectly sometimes, browsers can't display html content

    Our company is switching from Netscape Communicator to Internet Explorer 5.5 . This resulted sometimes in html-documents which could not be opened in netscape anymore, but caused the save-as dialogue box to pop-up.
    Analysis of this problem, with the aid of Oracle Support, showed some html-documents were stored in WWV_DOCUMENT with mime-type application/octer-stream. This is a mime type which should trigger the save-as pop-up dialogue in browsers. Netscape acts accordingly, but IE does display the content normally.
    The following events cause this problem:
    1. create a html document using a microsoft office product (word/excel)
    2. DON'T close the document in the office application
    3. Use the portal wizard to upload the file to a content area
    4. Use table WWV_THINGS and WWV_DOCUMENT and see mime-type isn't text/html but application/octet-stream
    5. IE shows the file, NN wants to save it.
    The workaround to this problem is to close the file in MSOffice before uploading it.
    Oracle Development confirmed it's the browser which sends this incorrect mime-type, and portal just stores this type. It seems this mime-type is overruling the extension to mime-type mapping in the configuration of Apache, using AddType or the file mime.types.
    So the mime-types defined in apache are only used outside mod_plsql, that is, when files from the filesystem of the webserver itself are used.
    When uploading a zip-file, and unzipping it in the database, all files get the right mime-type. It seems in this situation the mime-type is determined by looking either at the file-extention or the magic bits.
    Oracle says it's a microsoft bug, so I'll have to ask Bill for a fix.
    They are probably right, and I think I could reproduce this using CGI-scripting without modplsql and portal.
    But:
    It seems not logically to me that it depends on the method of uploading files (single files, or zipped files) which method of mime-type determination is used.
    Furthermore, I find it strange that it depends on the storage location of the file (database or filesystem) which mime-type is presented at the user.
    I'd like to hear your opinions about this
    Regards,
    Ton Haver

    You want to be using <html:link forward="YOUR_FORWARD"> only when you want to forward to static elements and not elements that require actions. So in index.jsp, since you just want to forward to a static jsp page (allarticle.jsp), you can use
    <html:link forward="show">Show All forum</html:link>But since you want your "one forum" link to populate a session attribute BEFORE loading /jsp/loveforum.jsp, you need
    <html:link action="article">one forum</html:link>The reason it's not working now is because you're accessing a session attribute that isn't populated becuase you link to the page statically and it never gets the value of "list" actually stored in the session.
    The reason it works when you change your forward element is because it calls the action that saves "list" into your session.

  • Images in servlets mime type text/html

    HI at all,
    <br><br>
    i have the following problem:
    <br><br>
    I cant get an image to be displayed on my web browser unsing a servlet.
    <br><br>
    hier is a sample code of the servlet :
    <br><br>
    package imageservlet;
    <br><br>
    import java.io.*;<br>
    import javax.servlet.*;<br>
    import javax.servlet.http.*;<br>
    <br>
    <br>
    public class ImageServlet extends HttpServlet<br>
    {<br>
    public void doGet(HttpServletRequest request, HttpServletResponse response)<br>
    throws IOException, ServletException<br>
    {<br>
    response.setContentType("text/html");<br>
    PrintWriter out = response.getWriter();<br>
    <br>
    out.println("<html>");<br>
    out.println("<head>");<br>
    out.println("<title>Picture Servlet</title>");<br>
    out.println("</head>");<br>
    out.println("<body>");<br>
    out.println("<p>Picture<p>");<br>
    out.println("<img src=\"images/image.png\" alt=\"image\" width=200 height=100>");<br>
    out.println("</body>");<br>
    out.println("</html>");<br>
    <br>
    }<br>
    }<br>
    <br>
    <br>
    and the web.xml file:<br>
    <br>
    <br>
    <web-app><br>
    <display-name>Image Servlets</display-name><br>
    <description>Image Servlet Test</description><br>
    <servlet><br>
    <servlet-name>ImageServlet</servlet-name><br> <servlet-class>imageservlet.ImageServlet</servlet-class><br>
    </servlet><br>
    <br>
    <servlet-mapping><br>
    <servlet-name>ImageServlet</servlet-name><br>
    <url-pattern>/</url-pattern><br>
    </servlet-mapping><br>
    </web-app><br>
    <br>
    <br>
    the directory structure of the application is:<br>
    <br>
    +---imageservlet<br>
    | +---images<br>
    | | image.png<br>
    | |<br>
    | \---WEB-INF<br>
    | | web.xml<br>
    | |<br>
    | \---classes<br>
    | \---imageservlet<br>
    | ImageServlet.class<br>
    <br>
    <br>
    the image location as provided by the browser after the <br>servlet call is:
    <br>
    http://localhost:8085/imageservlet/images/image.png<br>
    <br>
    <br>
    So my questions are:<br>
    <br>
    - What' wrong in the things above ? <br>
    <br>
    - Waht / how to do get the images displyed on the browser<br> ? (Please note that the mine type is txt/html)
    <br>
    Many thanks for any help<br>
    <br>
    SF.<br>
    <br>
    Message was edited by:
    fahd_saida
    Message was edited by:
    fahd_saida
    Message was edited by:
    fahd_saida

    Hi,<br>
    <br>
    <br>
    Lots of thanks paulcw !!!<br>
    <br>
    I finaly solved the problem.<br>
    <br>
    I had to delete the url-pattrern / and to add the mapping for the image directory, also in the code i used a full path to the image.<br>
    <br>
    thus the relevant parts in the web.xml look now like this:<br>
    <br>
    <br>
    <servlet-mapping><br>
    <servlet-name>ImageServlet</servlet-name><br>
    <url-pattern>/imageservlet</url-pattern><br>
    </servlet-mapping><br>
    <br>
    <servlet-mapping><br>
    <servlet-name>ImageServlet</servlet-name><br>
    <url-pattern>/images</url-pattern><br>
    </servlet-mapping><br>
    <br>
    <br>
    <br>
    <br>
    and the relevant code part lke this:<br>
    <br>
    out.println("<img src=\"" + request.getContextPath() + "/images/image.png\" alt=\"image\" width=200 height=100></img>");<br>
    <br>
    with these settings it works just fine :-)<br>
    <br>
    <br>
    Is there any way to keep the url-pattern / to avoid calling the servlet using this (in my opinion) too long url<br>
    <br>
    http://host:port/imageservlet/imageservlet ???<br>
    <br>
    thanks.<br>
    <br>
    SF.<br>
    <br>

  • Unable to launch application from my machine:Bad MIME Type

    Hi,
    The following error message was printed when I tried to access the SwingSet2 demo from the Java Web Start site.
    An error occurred while launching/running the application.
    Title: SwingSet2
    Vendor: Sun Microsystems, Inc.
    Category: Download Error
    Bad MIME type returned from server when accessing resource: http://java.sun.com/products/javawebstart/apps/SwingSet2.jnlp - text/html
    Can you please suggest what is to be done to rectufy this problem?
    Regards,
    Satish

    Bad MIME type returned from server when accessing
    resource:
    http://java.sun.com/products/javawebstart/apps/SwingSet
    .jnlp - text/htmlit should return application/x-java-jnlp-file.
    My guess is that you use proxy which messes up headers.
    Otherwise try to reinstall Web Start, then enable the console and log output in Web Start's advanced preferences to get more clues what's going on.
    Regards,
    Marc

  • File/Open Dialog Box / Setting MIME type

    In my application, I am calling a web service that returns text that I need to download into an EDI application. I am simply looking to have an open/file dialog box open when the text is returned. I was using the following code in a PL/SQL process:
    begin
    -- Set the MIME type
    owa_util.mime_header( 'application/octet', FALSE );
    -- Set the name of the file
    htp.p('Content-Disposition: attachment; filename="EDIOuput.edi"');
    -- Close the HTTP Header
    owa_util.http_header_close;
    end;
    The problem is the HTML code that comes along with the text that is returned. Is there a way to simple call the procedure on a page that only containes the raw data?
    Thank you.

    HTML doesn't provide you the possibility to select multiple files or select folders at a single browse. Thus JSF can't do any much for you. Best what you can do is to write a signed applet or web start application which does the task. The Mojarra Scales component library has a ready-to-use component which embeds an applet which does that task. Check [https://scales.dev.java.net/multiFileUpload.html].

  • How to restrict uploading files by mime type?

    Hi,
    I have been searching the forum (and Google) looking for tips on how to ensure users can only upload files of specific formats (Word, PDF, etc) for specific document types as defined within the application (e.g. Curriculum Vitae (Word), Copy of Transcripts (PDF)).
    While I have used this research to start work on a server-side solution, I would like to know if there is an apex-friendly way to "validate" a file-browse item based on mime-type.
    Has anyone else had to address this?
    Ted

    Hi,
    I would like to know if there is an apex-friendly way to "validate" a file-browse item based on mime-typeHow about, you create a check constraint on your MIMETYPE column. something similar to this:
    alter table "MY_TABLE" add constraint
    "MY_TABLE_CON" check ( "MIMETYPE" = 'application/pdf' or "MIMETYPE" = ......)Or you can use this plugin, provided using browsers supporting HTML 5:
    http://www.theapexfreelancer.com/apex/f?p=APEXFREELANCER:FILE_UPLOAD:0
    For friendly,
    Please check error handling :
    http://www.inside-oracle-apex.com/apex-4-1-error-handling-improvements-part-1/
    Best Regards,
    Fateh

  • Using MIME type to open file in different window

    Hello, I am popping up a Save File Dialog Box for an Excel file being generated in my system using POI. I am using the MIME type to display this dialog. The problem is that if the user selects 'Open' instead of 'Save', it opens in the same window. Is there any way to set an attribute to tell it to open the file in a new, separate window?

    Nope. The response is sent to wherever the request came from. If you want the response to open in a new window then the HTML that sends the request has to say that.

  • Safari doesn't display an object with MIME type video/mp4

    So, I've got a little hiccup here. I put together a CV in html with samples you can click to bring up. Now, I don't make any claims to professional geekdom, but I try to be fairly html savvy, and since I'm sending this to the college IT guys, I want to do it right. So I'd like this thing to use valid w3c compliant html. Not too tough, fix some missing quotes and learn how to use the object tag instead of embed. Done.
    Well, here's the problem. I loaded it into Safari for testing, and a Quicktime file won't play. Now, it runs fine on Firefox. The obtuse and awkwardly lumped in IE version of the object works fine (tested in IE6, Win2K virtual machine). And the same file ran fine when I had it using an embed tag. Now it just brings up the Quicktime emblem, takes up the specified amount of space, and doesn't do anything.
    What did I do wrong? I've got the latest Quicktime and Safari, and I know it's standards compliant. Do I have to feed it some more specific type for an h.264 encoded mp4?
    Here's the code I used. The embed tag is the one that works, the object tag is the compliant one that doesn't. I'm guessing I'm missing a parameter or something. Any advice?
    <embed scale="1" src="files/Sabres.mp4" pluginspage="http://www.apple.com/quicktime/download/" autoplay="FALSE" volume="100" cache="TRUE" height="496" width="640">
    <object type="video/mp4" data="files/Sabres.mp4" height="496" width="640">
    <param name="controller" value="true">
    <param name="autoplay" value="false">
    Your browser cannot display this content. Click here to download it.
    </object>

    Tom and Kirk, thanks for your time. That would work, but since <embed> is a non-standard tag, I want to avoid it.
    Andy, I actually stopped by that site last night, and I did use it for the object code.
    My problem is that for some reason, what looks like a legitimate implementation of <object> isn't displaying in Safari. I know Firefox is a bit more forgiving of sloppy code, so I don't blame Safari for that one. I know Safari can display the file because it displayed it properly when I called it with embed. I'm just not sure what's wrong with the code that's making Safari not bring up the video. It knows it's Quicktime and loads the file, I know that, because it brings up the emblem and starts hoarding RAM when I bring it up in Safari, but it just holds there. I've tried a couple MIME types, including video/quicktime and video/mp4, both worked in Firefox, and video/h264 just as a shot in the dark, and both Safari and Firefox showed the alternate content.
    By the way, here's the full code I used to display the object, using Castro's cloaking technique for IE compatibility. I omitted it earlier because when I isolated the non-IE section alone in the body of the document it behaved the same as it did with the cloaking (working in FF, broken in Safari).
    <!--[if IE]>
    <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="496" width="640">
    <param name="src" value="files/Sabres.mp4" >
    <param name="controller" value="true">
    <param name="autoplay" value="false">
    </object>
    <![endif]-->
    <!--[if !IE]> <!-->
    <object type="video/mp4" data="files/Sabres.mp4" height="496" width="640">
    <param name="controller" value="true">
    <param name="autoplay" value="false">
    Your browser cannot display this content. Click here to download it.
    </object>
    <!--<![endif]-->
    Message was edited by: The Spine

  • Mime-type tag in web.xml and attachment download

    i have set a mime-type in web.xml as below:
    <mime-mapping>
         <extension>xls</extension>
         <mime-type>application/vnd.ms-excel</mime-type>
    </mime-mapping>
    And i have a simple jsp that only shows a table and i am making this jsp to get downloaded as an excel attachment. To make it possible i have written the following line in the JSP:
    response.setHeader( "content-disposition", "attachment; filename=myexcel.xls" );
    But i am not setting the content type first by writing:
    response.setContentType( "application/vnd.ms-excel" );
    since i have already mentioned the appropriate mime-type for excel files in web.xml.
    I am using both mozilla and IE. Both are showing file download dialog. But IE is able to correctly identify the type of the attachment and opens it up with Microsoft Excel whereas mozilla fails to identify the type, assumes it to be an HTML document and opens it up in a new window of IE.
    mozilla works fine only when i set the content type in the JSP itself. But IE works in all conditions even without having the mime-type tag in web.xml.
    If i have already specified the mime-type for particular type of file in web.xml, is there any requirement to set the content type again in the JSP/servlet?
    Please help. I even changed the mime-type for .xls (excel) files in web.xml and made it text/plain, but still the same thing is happening. IE is always showing the correct file type where as mozilla is taking it as an HTML document.
    i am using weblogic server 8.1.

    the web xml mime type setting are for static files served by the server...
    if you print a file directly to the output of the servlet, you must set the mime type, so DO write :
    response.setContentType( "application/vnd.ms-excel" );
    IE "works fine" because it also uses the file extension to decide the mime type... but in the absolute, it's a wrong behaviour

  • Mime type note set for css with wwv_flow_file_mgr.get_file

    Hello,
    We have an apex application over here that has problems with the mime type of a theme (css) file. The css file works correctly in IE but not in FF or Chrome (because IE check the file extension, but FF seems not do not ..).
    This is the call that is failing
    <link type="text/css" rel="stylesheet" href="wwv_flow_file_mgr.get_file?p_security_group_id=33490830277084435&p_fname=theme_3_1.css" />
    in the FF error console it complains about the file being of application/octet-stream instead of text/css and therefore it will not load it.
    I have created a simple local .htm file with
    <html>
    <link type="text/css" rel="stylesheet" href="http://xxx.xxx.xx/pls/htmldb/wwv_flow_file_mgr.get_file?p_security_group_id=33490830277084435&p_fname=theme_3_1.css" />
    </html>
    And it loads the file (even though it says it is still application/octet-stream) in FF, but it will not do the same if called from Apex.
    I'm kind of lost here, so any ideas where to look for an explanation/fix ? (Yes, we have the AddType text/css .css in the httpd.conf)
    regards.

    Hi UserXY,
    what connectivity module do you use (Oracle HTTP Server, Embedded PL/SQL Gateway, APEX Listener)?
    Which Browser did you use to upload the css-File?
    I don't know why this happend in your case, but you could try a different browser to upload the file again.
    brgds,
    Peter
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    Work: http://www.click-click.at

Maybe you are looking for