Results 1 to 4 of 4

Thread: Content-type problem for XML in Explorer....

  1. #1

    Default Content-type problem for XML in Explorer....

    Hi my friends,

    Sorry for bothering again but i still couldn't solve my problem.
    I am trying to read an XML file into a datastore and then show it in a html div element. It works fine in firefox or chrome but unfortunately it doesnt work in Explorer.
    In everywhere, it is written that explorer cannot notice the content-type of file is xml and i need to set it manually into html response. But i really couldn't understand how to make it. Because the xml file is not producing by the server, it is just a static xml file on disk. So i need your advice so much.....Here is my code:

    var submenuReader = new{
         	        record: 'Menu',
         	        id: '@name',
         	        fields: [
         	            {name: 'Name', mapping: '@name'},
         	            {name: 'Url', mapping: '@url'},
         	            {name: 'Menu', mapping: '/'}
         	    var dataStore = new{
         	        proxy: new{
         	            url: 'menu.xml',
         	  	    headers: {"Content-Type": "text/xml; charset=utf-8"}
         	        reader: new{
         	            record: 'Item',
         	            id: 'MenuGroup',
         	            fields: [
         	                {name: 'Submenus', convert: function(v, n){
         	                    return submenuReader.readRecords(n).records;
         	    dataStore.on('load', function (store, records, options) {
         	        var tpl = new Ext.XTemplate(
         	                '<tpl for=".">',
         	                    '<a href="#">{}</a>',
         	                    '<tpl for="">',
         	                    	'<a href="{}">{}</a>',
         	       tpl.overwrite(Ext.get("menu"), dataStore.getRange());

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    The Netherlands


    No, don't set the content-type in the request header. It needs to be set in the response header.

    Which HTTP server are you using? Apache? In that case you should configure the response header for *.xml files in the httpd.conf file (but it should already default to text/xml).

  3. #3


    i am using weblogic 11g

  4. #4
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    The Netherlands


    I have no experience with WebLogic, but a quick Google turned up:

    Add to web.xml:

Similar Threads

  1. XML rendering problem in Flash componenet using Portal and Content Panel
    By sathishb in forum Ext GWT: User Extensions and Plugins
    Replies: 0
    Last Post: 10 Nov 2010, 7:06 AM
  2. AJAX form post content type problem
    By kolaloka in forum Ext 3.x: Help & Discussion
    Replies: 5
    Last Post: 2 Feb 2010, 5:00 AM
  3. Ajax, XML, POST and PUT, Content Type
    By tellioglu in forum Ext 2.x: Help & Discussion
    Replies: 10
    Last Post: 4 Apr 2008, 1:12 PM
  4. Problem with grid with Content-Type application/xhtml+xml
    By Cavalier in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 1 Apr 2007, 4:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts