MicroStrategy ONE
Adding Custom Classes
The classes that ship as part of MicroStrategy Web products are shipped as compiled Java Archive (JAR) files.
If you want to implement custom classes, you can implement the classes loosely or you can compile them into custom JARs. To compile JAVA files, make sure you include all the MicroStrategy JAR files (along with their path) in the CLASSPATH.
The following instructions summarize the J2EE standard with respect to class implementation and describe how to accomplish the implementation using either approach.
Implementing custom class files
You can accomplish this by placing your class files in the WEB-INF/classes folder along with the package structure.
For example, suppose you create a class called MyCustomClass.class which has the following package structure: packageA.packageB. The directory structure for the packages, starting with packageA, is as follows: WEB-INF/classes/packageA/packageB/MyCustomClass.class. Placing the packages and classes in the WEB-INF/classes folder ensures that you do not need to make any other modifications.
Restart the application server for the changes to take effect.
Maintain the appropriate directory structure based on the package definitions for each of your classes. If you package all your custom classes with a common top-level parent, you maintain the ease of future upgrades because you only need to cut and paste the folder containing all your custom classes.
Implementing custom Java Archive (JAR) files
It is often desirable to zip up Java class files into a Java Archive files for convenience. MicroStrategy Web can access your custom JAR files if you zip your custom classes into a JAR file, just as it accesses its own classes through a series of JARs.
The default location of the JAR files used by MicroStrategy Web products differs depending on whether the implementation is in J2EE or the .NET environment. JAR files for MicroStrategy Web products in a J2EE environment are installed by default in the WEB-INF/lib folder. JAR files for MicroStrategy Web products in a .NET environment are installed by default in the Common Files/MicroStrategy folder.
For both J2EE and .NET environments, you can place your custom JAR files in the WEB-INF/lib folder so you do not need to make any other modifications. You only need to restart the application server for the changes to take effect.