HELP : mime types ?

I am using Weblogic 6.0 sp2 on RedHat 6.2 as the web server and application
server. I have a microsoft word document abc.doc under the default
web-application. I try to get the file by "http://server/abc.doc". Normally,
it will be opened by micsoft word inside the Internet Explorer or donwload
box. But for Weblogic, the file show as text file with asicc data. Do I need
to set the Mime types manually and where can I set it?
Thanks.
Chris

The container provides some standard "default" mime mappings out of the box
but you can add any others to your web.xml deployment descriptor.
From your list, I think that zip and exe should be among the default
mappings. Are you sure they don't work for you unless you provide the
mapping in web.xml?
"Christopher" <[email protected]> wrote in message
news:[email protected]..
I checked other file types such as zip, xls, avi, swf, exe, asf, ram, dcr,
pdf etc. Do I need to add them all to the web.xml?
Thanks.
Chris
"Ian M. Goldstein" <[email protected]> wrote in message
news:3b813eb6$[email protected]..
You can configure mime mappings in your web application's
WEB-INF/web.xml
deployment descriptor -- see step 12 at
http://e-docs.bea.com/wls/docs61//webapp/webappdeployment.html#1012209
The mapping for Microsoft Word documents will look like this:
<mime-mapping>
<extension>doc</extension>
<mime-type>application/msword</mime-type>
</mime-mapping>
Now, when you request http://myserver:myport/myapp/myword.doc the
browser
will open it as a Microsoft Word document.
Regards,
-- Ian
"Christopher" <[email protected]> wrote in message
news:[email protected]..
I am using Weblogic 6.0 sp2 on RedHat 6.2 as the web server andapplication
server. I have a microsoft word document abc.doc under the default
web-application. I try to get the file by "http://server/abc.doc".
Normally,
it will be opened by micsoft word inside the Internet Explorer or
donwload
box. But for Weblogic, the file show as text file with asicc data. Do
I
need
to set the Mime types manually and where can I set it?
Thanks.
Chris

Similar Messages

  • Image size and mime type.. non-java guy needs help

    Image size, mime type.. non-java guy needs help
    Im not at all familiar with java so this is really weird for me to work out. I?ve been doing it all day (and half of yesterday).
    Im trying to write a custom clodFusion tag in java that gets the width, height, size and MIME types of a given file. I?ve been trying to get it to work on the command line first. I can get the width and height but cant get the size and the MIME type.
    Here is what I got
    /*import com.allaire.cfx.*;*/
    import java.awt.image.renderable.*;
    import javax.media.jai.*;
    import com.sun.media.jai.codec.*;
    import java.io.*;
    import java.util.*;
    public class ImageInfo {
    private RenderedOp image = null;
    private RenderedOp result = null;
    private int height = 0;
    private int width = 0;
    private String type = "";
    private String size = "";
    public void loadf(String file) throws IOException
    file = "80by80.jpg";
    FileSeekableStream fss = new FileSeekableStream(file);
    image = JAI.create("stream", fss);
    height = image.getHeight();
    width = image.getWidth();
    System.out.println(height + "\n");
    System.out.println(width);
    System.out.println(type);
    public static void main(String[] args) throws IOException {
    ImageInfo test = new ImageInfo();
    test.loadf(args[0]);
    can anyone please help me out to modify the above so I can also print the mime type and the file size to screen.
    thanks for any help

    any suggestions?

  • MIME type setting on Tomcat server.  Please help.

    Hi all.
    Can someone shed me some lights on setting up MIME type. I added the followings to the web.xml file in /WEB-INF directory, restarted webserver, and still saw my jnlp file as text file in the browser. What did I do wrong?
    <init-param>
    <param-name>jnlp-extension</param-name>
    <param-value>.xjnlp</param-value>
    </init-param>

    do you use Apache as your web server?
    if so the just add the following line to the .mime.types configuration file:
    application/x-java-jnlp-file JNLP
    Tomcat is more a servlet server than a web server... so i don't know if it can be responsable for serving jnlp files or not....
    Anyhow, hope this helps in some way...

  • 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.

  • Help: MIME plugin type x-ms-wmp

    Hi All,
    I keep getting an error message stating that I am missing the proper plugin to view content of MIME type "application/x-ms-wmp" whenever I visit a particular website. I have installed Flip4Mac, but still it does not work. Does anybody know if there is another solution?
    The website I am trying to access is http://www.mako.co.il/music
    Thanks in advance for your help
    -Christian

    Hi thanks for your response.
    Yes, I have also tried with Firefox (and on multiple computers, all with Flip4Mac installed), and it also did not work.
    Any other suggestions that I can try before I call it quits on this one?
    -Christian

  • Proxy mime types problem (HELP!)

    I have an application which I have running ow two machines. On one
    machine, WebLogic is running on port 80. On the other machine I am
    using iPlanet Web Server with the NSAPI plugin pointing back to a
    WebLogic server running the same application.
    It appears as though the content types (read mime types) of the
    out put are different between the two servers. On the first
    server (weblogic only), the output appears to have a text/html
    content type whereas on the second server, (weblogic+iPlanet), seems
    to provide the result as text/plain. This does not seem to matter
    when I run with Netscape or IE, but has a significant impact when
    the client is a Palm VII.
    Any suggestions as to the problem and or solution?
    [bryon.vcf]

    You need to set the mime types in the web.xml file. For example:
    <mime-mapping>
    <extension>xls</extension>
    <mime-type>application/octet-stream</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>doc</extension>
    <mime-type>application/octet-stream</mime-type>
    </mime-mapping>
    I have had good luck with "application/octet-stream" but you may want to try and
    experiment.
    Now for a question of my own :-) Anyone know how to set the default mime type
    --- that is, if none of the extensions that you explicitly specify matches the
    file, is there any way to indicate what MIME type to use?
    Clark
    "Christopher" <[email protected]> wrote:
    I am using Weblogic 6.0 sp2 on RedHat 6.2 as the web server and application
    server. I have a microsoft word document abc.doc under the default
    web-application. I try to get the file by "http://server/abc.doc". Normally,
    it will be opened by micsoft word inside the Internet Explorer or donwload
    box. But for Weblogic, the file show as text file with asicc data. Do
    I need
    to set the Mime types manually and where can I set it?
    Thanks.
    Chris

  • HELP: Fail to surf a web contain MIME type file

    I am currently using Safari version 1.3.2
    I tried to surf a music website but the following message has shown.
    "The page has content of MIME type “application/x-oleobject”. Because you don’t have a plug-in installed for this MIME type, this content can’t be displayed."
    Does anyone know how to solve this problem?
    Many thanks!
    I BOOK G4   Mac OS X (10.3.9)  

    Hi Phe,
    The only solution is to use Microsoft Windows I'm afraid. OLE is a Windows only technology.
    Send feedback to the website about it only being accessible to Windows users.

  • 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

  • How To Get FileType and MIME Type from a File

    Hi,
    I am using following ways to get FileType and MIME Type.
    I am able to get file type, but I am getting MIME Type as */*
    Can any one please let me know how to get MIME Type, but it should not be time consuming process.
    For File Type I am using following Code:
    private String getFileData(InputStream inStream) {
    fileName = C:\temp\temp.tiff
    String filePath = Util.createTempFile(fileName);
    RandomAccessFile raf = new RandomAccessFile(filePath, "rw");
    while (inStream.available() > 0) {
         byte[] buf = new byte[inStream.available()];
         inStream.read(buf);
         raf.write(buf);
    inStream.close();
    raf.close();
    File file = new File(filePath);
    JFileChooser chooser = new JFileChooser();
    String fileType = chooser.getTypeDescription(file);
    file.delete();
    //MIME Type I am getting from
    DataHandler data = new DataHandler(new DocumentSource(inStream));
    data.getContentType();
    data.getContentType() is not working well in all cases.
    Can any one help me on this.
    Thanks in advance,
    Ram.
    Edited by: javausers07 on Apr 15, 2009 4:25 PM

    javausers07 wrote:
    Hi,
    I am using following ways to get FileType and MIME Type.
    I am able to get file type, but I am getting MIME Type as */*
    Can any one please let me know how to get MIME Type, but it should not be time consuming process.
    For File Type I am using following Code:
    private String getFileData(InputStream inStream) {
    fileName = C:\temp\temp.tiff
    String filePath = Util.createTempFile(fileName);
    RandomAccessFile raf = new RandomAccessFile(filePath, "rw");
    while (inStream.available() > 0) {
         byte[] buf = new byte[inStream.available()];
         inStream.read(buf);
         raf.write(buf);
    inStream.close();
    raf.close();
    File file = new File(filePath);Why do you do all above?
    JFileChooser chooser = new JFileChooser();
    String fileType = chooser.getTypeDescription(file);
    file.delete();
    //MIME Type I am getting from
    DataHandler data = new DataHandler(new DocumentSource(inStream));
    data.getContentType();
    data.getContentType() is not working well in all cases.That's because there's no way to get MIME type of all files on all filesystems.
    Kaj

  • Need to get the MIME type of Files

    hi
    I have a table which contains Partno and the images name i.e PRODUCT_AWG_20070416 and the data would be like that :-
    partno img_name
    PX1 px1.jpeg
    PX2 px2.jpeg
    PX3 px3.jpeg
    Now one by one i am Inserting those files into my table (img_temp -BLOB Column) which are exists in directory & the map file. but i also need to insert the MIME type of the inserted file. can you please provide me the way to generate MIME type on the basis of file type like (JPG,GIF,TXT etc).
    the procedure i am using is as follows :
    hi
    I have a TABLE which contains Partno AND THE IMAGES NAME i.e PRODUCT_AWG_20070416 AND THE DATA would be LIKE that :-
    partno img_name
    PX1 px1.jpeg
    PX2 px2.jpeg
    PX3 px3.jpeg
    Now one BY one i am INSERTING those files INTO my TABLE (img_temp -BLOB COLUMN) which are EXISTS IN DIRECTORY & THE map FILE. but i also need TO INSERT THE MIME TYPE OF THE inserted FILE. can you please provide me THE way TO generate MIME TYPE ON THE basis OF FILE TYPE LIKE (JPG,GIF,TXT etc).
    the reason of this requirement is, we need to use that table in APEX 2.2 fromwhere i can download the inserted file and to download the file we need to get correct MIME_TYPE of that file.
    Please Suggest me the way.
    Thanks.
    The Procedure which i am using is as follows :
    CREATE OR REPLACE PROCEDURE img_uploader IS
    CURSOR Cur_img IS SELECT part_no,image_file FROM PRODUCT_AWG_20070416
                             WHERE Transaction_id =1 ;
    l_bfile BFILE;
    l_blob BLOB;
    BEGIN
    FOR Cur_img_val IN Cur_img LOOP
    l_bfile := BFILENAME('SOLVS_PRODUCT_IMG', Cur_img_val.image_file);
    INSERT INTO img_temp (part_no,MIME_type,file_name, img)
    VALUES (Cur_img_val.Part_no,NULL, Cur_img_val.image_file,EMPTY_BLOB())
    RETURN img INTO l_blob;
    DBMS_LOB.fileopen(l_bfile, Dbms_Lob.File_Readonly);
    DBMS_LOB.loadfromfile(l_blob, l_bfile, DBMS_LOB.getlength(l_bfile));
    DBMS_LOB.fileclose(l_bfile);
    END LOOP ;
    COMMIT;
    END;

    Hello,
    Perhaps this can help:
    http://help.sap.com/saphelp_nw04/helpdata/en/ad/ebe5cc1d75aa43a2871717d76f475d/content.htm
    If you want to know the table name, turn on tracing (ST05) when accessing the MIME types.
    regards
    Rick Bakker
    Hanabi Technology

  • How to get the Mime Type of the file?

    Hi Everyone!,
    I want to upload a random file into my table as a BLOB and simultaneously want to fill the respective another column with its MimeType. Earlier I used Oracle Apex for this, but due to my new requirement I need to make this happen with the help of PL SQL and Forms. Could you help me in getting how we can upload the file and most importantly, how we can get its Mime-Type.
    My chosen file can be of any type; it can be doc ,pdf,txt,xls ,gif or any other format.
    If you could provide the example with your reply then it would be great.
    Thanks
    Harbinder

    hi
    for that u have to use webutil.
    declare
          f varchar2(100);
    begin
         f := webutil_file.file_open_dialog();
         if f is not null then
              :doc.doc_name := f;
              end if;
         end;and
         DECLARE
    filename VARCHAR2(256);
    BEGIN
    filename := CLIENT_GET_FILE_NAME (File_Filter => 'jpg (*.jpg)|*.*|');
    READ_IMAGE_FILE(filename, 'jpg', 'image');
    END; sarah

  • 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.

  • How to set Mime Type for Static Files

    Hi All,
    I am working on Apex 3.2.1.00.10.
    When I am trying to upload (create) a ".js" file into Static Files under Shared Components of an application; it is saving as "*text/plain*" for Mime Type. But I need Mime type to be set as "*application/x-javascript*".
    Please help me to change the Mime type of .js file.
    Or is there any way to upload the file directly as "*application/x-javascript*" as its Mime Type.
    Thanks in advance.
    Umesh

    In IIS v4 which comes with the Windows NT4 option pack, you right click the web page you are working with, select properties, then go to the HTTP Headers tab. At the bottom there's a button labelled File Types in the MIME Map section.
    After you've clicked that, you can add the two mime types you need;
    Associated Extension MIME Type
    .jar application/x-java-jar-file
    .jnlp application/x-java-jnlp-file
    I'm assuming that it is the same in W2k/IIS5.

  • Prompting a "Save As" dialog for an accepted mime type

    Hi ,
    I am using the following code to prompt a "Save As" dialog bod for an xls file:
    response.setHeader("Content-disposition","attachment; filename=test.xls");
    This does work, it prompts the save as dialog box with the name "test.xls" if i click on save. However if i click on open, it displays an error saying the file could not be found.
    Any idea how to specify a custom file name for an accepted mime type?
    Thanks in advance

    Ok let me try & be more clear.
    I have a JSP page. In this page there is an "Create Excel" link. When this link is clicked, the JSP dynamically creates the data. Then the following code:
    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-disposition","attachment; filename=test.xls");
    This causes the file save dialog box to be created. This dialog box has "open" & "save" options.
    When the save option is clicked, the user is prompted to save a file named test.xls. However if the user clicks on the "Open" dialog box, then the file is not opened,i get an error message saying the file does not exist.
    If i dont specify the
    response.setHeader("Content-disposition","attachment; filename=test.xls");
    Then the file save dialog box displays a default filename which is the same as name of my servlet. This works for both Open as well as save options.
    I hope i have not confused you further..:)
    Please help!

  • How to use JavaSript library stored in mime type repository???

    Hi Experts
    I currently have the situation that I would like to deploy several JavaScript functions in a multitude of templates. I need my own JavaScript functions as the provided functionality is not sufficient.
    I have figured that I can add my function by using the script item and that works fine, but it requires the script to be entered in every template.
    My idea is to store the central JS file in the mime type repository and then reference it, however it doesn't seem to work.
    Does anybody have an idea on how to make it work or alternatively have a central JavaScript library that is used by several different templates?
    Thanks for your help, regards,
    Minima

    Thanks for the answer, DEEPU's comment realer helped.
    Another solution is to create a Web Item that contains the coding. The Web Item can then be stored as reusable. This also looks like a neat solution for the problem.
    Hope it will help some people.
    Regards,
    Minima

Maybe you are looking for

  • ITunes transfer from old pc to new pc

    Hi, I have not sync my iphone to my old pc for the past 6 month. But my old pc just died last night. I am able to get back my iTunes backup from the old pc but the data inside is the backup i sync 6 month ago. So my question is if i transfer the back

  • No Broadband Connection on BT Vision

    When using the On Demand feature through Vision box, I have a wee orange box come up saying Broadband isn't connected. All the lights are showing on the Hub and I have Broadband/Internet access through IPad. I placed a call last Sunday and was on the

  • Burn to DVD without having to render?

    In need of some help! I've been having the worst problems rendering - it's just taking TOO long and I'm leaving Friday to Prague and absolutely must have this film on DVD before I leave. Is there ANYWAY to burn the project to a DVD without the time c

  • How to scroll panels using scrollpane?

    i am having two panels containing different images in a main panel. my problem is that due to big size only one panel is visible in run time so i want to add scrollbar to the main panel. i have used scrollpane for the main panel but i am getting conf

  • Manufacturing with a third party, How to control cost and automate

    JDE E1 v8.12 will be upgrading to 9.0 I am new to this so if someone has ideas or point me in the right direction. You see we Order a supply of Wrappers, Trays(Boxes) and Master Shippers(Cases). This is put into inventory . We Only ship out amount ne