配置mondrian支持XMLA和中文编码

在Web.xml中添加,添加其中黑体部分转换中文编码,否则显示为“?”
......

 
    MondrianXmlaServlet
    mondrian.xmla.impl.DefaultXmlaServlet
   
      CharacterEncoding
      UTF-8
   
 
...................

 
    MondrianXmlaServlet
    /xmla
 


添加datasource.xml

<?xml version="1.0"?>
<!--
  == $Id: //open/mondrian-release/3.1/webapp/WEB-INF/datasources.xml#2 $
  == This software is subject to the terms of the Eclipse Public License v1.0
  == Agreement, available at the following URL:
  == http://www.eclipse.org/legal/epl-v10.html.
  == (C) Copyright 2005-2006 Julian Hyde and others.
  == All Rights Reserved.
  == You must accept the terms of that agreement to use this software.
  --&gt

    <!--
         A data source is a collection of logically related Mondrian
         catalogs.

         The XMLA specification allows an XMLA provider to have
         multiple data sources, but some clients, particularly ones
         based on ADOMD.NET such as Simba's O2X client and Pentaho
         Spreadsheet Services, can only connect to the first declared
         data source. Therefore, we recommend that you use a single
         data source, containing multiple catalogs if necessary.
     --&gt
   
        <!--
             Name of the data source.
        --&gt
        Provider=Mondrian;DataSource=Cost;

        <!--
             Description of the data source.
        --&gt
        Cost Data Warehouse

        <!--
             The URL of the servlet.
        --&gt
        http://localhost:8080/mondrian/xmla

        <!--
             Mondrian connect string for the data source. If this data
             source contains multiple catalogs, omit the 'Catalog'
             property, and specify the URI of the schema.xml file in
             the catalog's element.

             Catalogs can override the connect string with their own
             element.
          --&gt
        Provider=mondrian;Jdbc=jdbc:mysql://localhost/costaccount?user=root&password=haidong;Catalog=/WEB-INF/queries/CostSchema.xml;JdbcDrivers=com.mysql.jdbc.Driver;
       
        <!--
             Provider name must be 'Mondrian'.
        --&gt
        Mondrian

        <!--
             Provider type must be 'MDP'.
        --&gt
        MDP

        <!--
             Authentication mode. Allowable values are
             'Unauthenticated', 'Authenticated', 'Integrated'.
        --&gt
        Unauthenticated

        <!--
             A data source contains one or more catalogs.
        --&gt
       
            <!--
                Catalog names must match the name inside the
                schema.xml file, and must be unique across all data
                sources defined in this datasources.xml file.
            --&gt
           
                <!--
                     Mondrian connect string for the data source. This
                     element is optional; if specified, it overrides the
                     data source's element. Typically,
                     you would use this element if the catalogs have
                     different JDBC data sources.
                 --&gt
                <!--
                Provider=mondrian;Jdbc=jdbc:odbc:MondrianFoodMart;JdbcDrivers=sun.jdbc.odbc.JdbcOdbcDriver
                 --&gt

                <!--
                    URI of the schema definition file.
                --&gt
                /WEB-INF/queries/CostSchema.xml
           
       

   
   


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/218005/viewspace-627558/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/218005/viewspace-627558/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值