Mime type for xml

i am writing a code in jsp which should download a xml file in client machine. now the problem is while loading it is showing to store the .jsp file to be stored which is storing it in xml format , but the alert message shown is showning to save as storexml.jsp which is a jsp extension. i want it to show as a xml extension
response.setContentType("application/vnd.xml");
filename="xyz.xml";
try{     
int i;
FileInputStream f=new FileInputStream(filename);
while((i = f.read()) != -1){
     out.write((char)i);
}catch(Exception e){
     Log.debug("can not write file in viewxml.jsp,exception :"+e);
     System.out.println("can not write");
i think the mime type should be something to deal with. could anyone tell me the correct one which will store it showing a .xml format by default.

but usually in some sites i have seen to upload files which gives a setting , if i dont have a text editor tehn i get the file window to save as document type but i if i have a editor then it should give to save as xml by default.
even that itried with storing as xls file which works fine there mime type is 'application/vnd-excel'
but it should work same as well in xml instead of it showing jsp document

Similar Messages

  • Incorrect MIME type for XML Data Connection POST requests

    It appears that Xcelsius 2008u2019s XML Data Connection logic does not specify the correct MIME type for the data it sends to the server in its POST request.  Using an HTTP debug proxy, I was able to see that Xcelsius sends XML data in the POST, but is setting a content-type of u201Cx-www-form-urlencodedu201D.  According to the W3C spec:
      http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1
    Data sent with a MIME type of u201Cxxu201D should be encoded as key?value pairs, like this:
      key1=val1&key2=val2&Submit=Submit
    So, what Xcelsius is doing is clearly incorrect.  Worse, if your server process is a Java servlet, you may find that the POSTed data will be gobbled up by the servlet container and you wonu2019t be able to read it using a getInputStream(), or getReader() call because itu2019s already been processed by a call to the getParameter() method.
    The correct mime type for POSTing an XML formatted request from Xcelsius should be "text/xml".
    Wayne

    Hi,
    The Error #2032 your getting is due to the Flash player security.
    To remove this this error you need one crossdomain Xml file in the root directory which actually provides a lot more control over who has access to your data from a SWF. The cross domain policy is attached as crossdomain.xml.
    In the XML file, it is used a wildcard (*). This allows a SWF located on any machine to access your data source. You can certainly use an IP address or domain name to restrict access rather to opening it up completely. I always start with the wildcard to make sure my dashboard works, then start restricting access as necessary.
    Here is a whitepaper with everything you need to know about Flash player security:
    http://www.adobe.com/devnet/flashplayer/articles/flash_player_9_security.pdf
    Please let me know if you need any more clarification.
    Regards,
    Sanjay

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

  • The MIME type for xslx file is different in Mozilla 13.0.1

    The MIME type for a xslx file is coming as "application/vnd.ms-excel.12" in Mozilla 13.0.1 instead of the "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" which comes in other browsers when using fileUpload.PostedFile.ContentType

    Firefox usually gets the MIME type from the MIME database registry key.
    * HKEY_CLASSES_ROOT\.xslx
    * HKEY_CLASSES_ROOT\MIME\Database\Content Type

  • Mime Type for document class when archiving outlook emails

    Hello team,
    can anybody fill me in how to configue the mime type for .msg files (outlook emails) in the document class msg?

    1) Use SE16 to change table V_TOADD
    2) Add:
    Document Class                 - MSG
    Description                         - Outlook Mail
    MIME type of a Web object - message/rfc822
    You can then associate the MSG document class to document types.
    Eli.

  • How to set MIME type for JNLP in Windows2000 IIS

    Hi!
    I try to set up my windows 2000 IIS's MIME type for JNLP to test java web start, but I have no idea how to set
    the MIME type. Can anybody help me???
    Best wishes

    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.

  • Best JMS Message Type for XML

              Which type of message is most suitable for XML file transfer? and why?
              what parameters decide the selection of message type for xml payload?
              

    "dyn" <[email protected]> wrote in message
              news:[email protected]..
              >
              > Which type of message is most suitable for XML file transfer? and why?
              > what parameters decide the selection of message type for xml payload?
              You can use WebLogic's XML message type if you like. If you want to use
              selector expressions then it is particularly useful, especially since your
              selector expressions can run on the body of the message. However, the
              implications of this are that the selectors are more expensive (both in
              terms of the processing needed to evaluate the XPath expression, and in
              terms of the fact that the message bodies have to be in memory to do the
              evaluation).
              If you just want to transfer XML, then why not use a simple text message
              type.
              Use whatever suits your needs.
              Regards,
              Jon
              

  • Any code available to get mime-type for file?

    Hi,
    at this link http://www.utoronto.ca/ian/books/html4ed/appb/mimetype.html you can find a huge listing of content-types for files. What I'd like to know is, if there's any code available for getting the right mime-type for a given file-extension. E.g given a filename "Document.doc" returns mime-type "application/msword".
    Thanks in advance,
    Tom

    U can use the isMimeType() method to compare various types.
    Eg. isMimeType("text/plain") or isMimeType("multipart/*") etc.

  • What is the correct MIME type for an AD RMS protected PFILE?

    Hi,
     The context of why this question is asked is as follows: In an SAP Webdynpro application (the UI is displayed in a web browser). We intercept the file with SAP data that is being downloaded, encrypt it using AD RMS and then send the modified (encrypted)
    file back to be downloaded by the browser into the user's downloads folder.
     Because of this interception and modification of the text file being downloaded (.txt), which is now a .PTXT file (PFILE) there is a conflict in the MIME TYPE. 
    So could you let me know what the MIME type for a PFILE would be? Is there a standard MIME Type for all these PFILES? (.ptxt, .pfile etc..)? And is it by any chance "application/octet-stream"?

    Hi,
    I also noticed this - it seems that Microsoft's 4 char extensions like .docx are not being recognized by application type so that either the web server or mod-plsql is defaulting to the "application/octet-stream" mime type which refers to a file with binary content - instead of the traditional "application/msword" mime type you would expect.
    If you know, at the point of insert into your database table, both the mime type and file name, one workaround would be to check if the mime type is 'application/octet-stream' and the file's extension is ".docx" or other likely extensions and then treat it as mime type 'application/msword", etc.
    Not really a solution but might be sufficient workaround depending on your situation.
    Ted
    Edited by: Ted Martin on Oct 25, 2012 7:27 PM

  • Standard mime type for .acsm file

    What is the standard mime type that should be used for an .acsm file?
    Is it this? - application/vnd.adobe.adept+xml
    I can see few eBook sellers sharing this mime type: application/vnd.adobe.adept (without the +xml).  I can see in such cases few of the free reader apps availbale in android / iOS are not recognizing the file.
    Pl advice.
    Thanks, Sundar

    I believe from looking around on the web, just the following is used:
    application/xml
    Take care, Mike
    Message was edited by: MikeWenzloff

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

  • Output type for XML in ECC - XI conversion?

    Hi,
    I ahve few queries regarding the PO o/p sent from ECC for XML output type...
    I header XML is supported in ECC from EHP4..is this true?
    If PO from ECC need to be sent out via XML,the output configuration for ECC PO's need to be changed also?
    Also if PO o/p needs to be sent EDI or XML,my understanding is XI will be mandatory for PO to be sent to supplier system.Can you pls confirm.
    Also when we say PO is sent via EDI(idoc) or XML,is there any difference in the data format/way in which data is sent to XI?If there any conversion happening on XI based on output type EDI or XML?
    On ECC side,is XML one of the output type or we just ALE and EDI?

    Hi,
       Check this help.
    http://help.sap.com/saphelp_srm30/helpdata/en/91/41faf2c220e84c9002a4ae4cc1906a/content.htm
    Best Regards,
    Ravi

  • Identifying the correct MIME type for file uploads

    How does Apex identify the MIME type of an uploaded file? I have a page that uploads a file and accesses it via APEX_APPLICATION_FILES. That works fine. The problem is that, for certain file types, the mime_types column is "application/octet-stream" instead of the correct file type. I think it's using the Content-Type from the client browser, though I'm not quite sure. Is there any way to override this server-side in Apex?
    I'm running Apex with mod_plsql. Adding an AddType directive to Apache and adding the correct association to the mime.types file did not work.

    Hi,
    I also noticed this - it seems that Microsoft's 4 char extensions like .docx are not being recognized by application type so that either the web server or mod-plsql is defaulting to the "application/octet-stream" mime type which refers to a file with binary content - instead of the traditional "application/msword" mime type you would expect.
    If you know, at the point of insert into your database table, both the mime type and file name, one workaround would be to check if the mime type is 'application/octet-stream' and the file's extension is ".docx" or other likely extensions and then treat it as mime type 'application/msword", etc.
    Not really a solution but might be sufficient workaround depending on your situation.
    Ted
    Edited by: Ted Martin on Oct 25, 2012 7:27 PM

  • How do I set the mime type for an attachment to "application/zip"

    I'm sending out an email with a zip file as an attachment. The following code works fine, but the Mimetype for the attachment is set to "application/octet-stream"
    FileDataSource fds = new FileDataSource(zipname);
    DataHandler dh = new DataHandler(fds);
    MimeBodyPart mbp2 = new MimeBodyPart();
    mbp2.setDataHandler(dh);
    mbp2.setFileName(fds.getName());
    I would like the mime type to be application/x-zip. Unfortunately I seem to need a data content handler for this mime type as I get this exception.
    javax.activation.UnsupportedDataTypeException: no object DCH for MIME type application/x-zip
    Building a date content handler in the activation framework seems like a lot of work to do a very simple thing. Am I missing something obvious? Is there a simple way to do this?

    I found the solution after much chasing around. The default mimetypes file that comes with the activation framework does not list zip.

  • Mime Types for .ps1 files

    I am trying to setup IIS to display .ps1 files in text format (i.e. same way it deals with .txt files, where it displays the contents in the browser). I set it up to be a text/plain but it still prompts me to download the file when I browse to it.
    What else am I missing?

    Hi Daniel,
    Agree with Mr X, in addition, you can also refer to this similar disscusion:
    In your IIS Manager, select the server node on the tree, and click "MIME Types". Then click "Add..." on the right panel. For extension, set it to .ps1, and set the MIME type to text/plain.
    You can do this for a specific web application or virtual directory, too. If you are doing this through web.config, it would look something like this, please backup this configuration file before edit:
    <configuration>
    <system.webServer>
    <staticContent>
    <mimeMap fileExtension=".ps1" mimeType="text/plain" /><!-- or application/octet-stream -->
    </staticContent>
    </system.webServer>
    </configuration>
    Refer to:
    Download powershell (.ps1) file via ASP.NET
    If you have any feedback on our support, please click here.
    Best Regards,
    Anna Wang
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

Maybe you are looking for

  • Frozen screen with xorg-server 1.16 and ati driver

    Hi, after upgrading xorg-server to 1.16 (yes, I've read the news), the screen is somehow frozen: I can move the mouse but when I e.g. want to open a gui/window, nothing happens. Only switching from tty1 to another tty and back to tty1 updates the scr

  • My Ipod Touch Won't Show as a device in iTunes

    Hope you can help, I'm running all the latest software (ie 10.5.6) on my iMac 2.GHz Intel Core 2 Duo. When I connect my iPod Touch, iPhoto automatically opens and the device is shown but my iTunes remains un-opened. When I manually open it and re-try

  • Why can't my Mac Pro use my hard drive(s)?

    Ok, so I'm using a 2008 mac pro (some specifics are listed at the bottom) and I'm having trouble with my hard drive(s). The hard drive I've been using is full, and sometimes the System Information will show that is full of Audio, Movies, Photos, Apps

  • How can I make compilation albums show up in genre on iPhone 5s?

    I love my iPhone 5. However I have noticed that when I look for music in my iTunes, and go under Genre, that some albums don't show up. I finally realized it is ALL the albums that are Compilations. Let's take Brazilian as an example. Several points

  • Report for viewing FB60

    Hi, I would like to know the t-code for viewing a list of all documents posted via FB60.  I only want to see what was posted with just FB60.  I do not have access to SE16N or SE16. Thanks, Kevin