在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.
-->
<!--
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.
-->
<!--
Name of the data source.
-->
Provider=Mondrian;DataSource=Cost;
<!--
Description of the data source.
-->
Cost Data Warehouse
<!--
The URL of the servlet.
-->
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.
-->
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'.
-->
Mondrian
<!--
Provider type must be 'MDP'.
-->
MDP
<!--
Authentication mode. Allowable values are
'Unauthenticated', 'Authenticated', 'Integrated'.
-->
Unauthenticated
<!--
A data source contains one or more catalogs.
-->
<!--
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.
-->
<!--
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.
-->
<!--
Provider=mondrian;Jdbc=jdbc:odbc:MondrianFoodMart;JdbcDrivers=sun.jdbc.odbc.JdbcOdbcDriver
-->
<!--
URI of the schema definition file.
-->
/WEB-INF/queries/CostSchema.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.
-->
<!--
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.
-->
<!--
Name of the data source.
-->
Provider=Mondrian;DataSource=Cost;
<!--
Description of the data source.
-->
Cost Data Warehouse
<!--
The URL of the servlet.
-->
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.
-->
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'.
-->
Mondrian
<!--
Provider type must be 'MDP'.
-->
MDP
<!--
Authentication mode. Allowable values are
'Unauthenticated', 'Authenticated', 'Integrated'.
-->
Unauthenticated
<!--
A data source contains one or more catalogs.
-->
<!--
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.
-->
<!--
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.
-->
<!--
Provider=mondrian;Jdbc=jdbc:odbc:MondrianFoodMart;JdbcDrivers=sun.jdbc.odbc.JdbcOdbcDriver
-->
<!--
URI of the schema definition file.
-->
/WEB-INF/queries/CostSchema.xml
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/218005/viewspace-627558/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/218005/viewspace-627558/