Integrate Software AG Products Using Digital Event Services : MashZone NextGen Help : Appendix : Legacy Presto components : Mashables and Mashups : Mashups in EMML : Writing Mashups in EMML : Transforming Intermediate Results : Adding User-Defined Scripting Code to Mashups : Adding User-Defined or Third-Party Java Classes for JavaScript Access
Adding User-Defined or Third-Party Java Classes for JavaScript Access
You can add user-defined Java classes or third party Java libraries directly to the classpath for the MashZone NextGen Server. Simply copy them to one of these folders:
*The external configuration folder, if any, for the MashZone NextGen Server.
Important:  
Deploying additional resources, such as custom XPath classes, to an external configuration folder simplifies future deployments or MashZone NextGen Server clusters.
*web-apps-home/mashzone/WEB-INF/classes. This is the default location, but is not recommended as it complicates MashZone NextGen Server deployments.
*web-apps-home/mashzone/WEB-INF/lib. This is the default location, but is not recommended as it complicates MashZone NextGen Server deployments.
Then, restart the MashZone NextGen Server.
Directly adding classes is simple, but can make upgrades more complicated and does not allow you to use different versions of third party libraries than the MashZone NextGen Server. To simplify migration or use specific versions of third party libraries, you add your user-define or third party classes and JARs to an application-scope folder.
To deploy classes in an application-scope
1. If needed, define a root folder for application scopes for the MashZone NextGen Server.
The root folder for application scoping must reside in the same host as the MashZone NextGen Server. The default root folder for application scoping is web-apps-home/apps but this can be any folder. To change this default:
a. Open the web-apps-home/mashzone/WEB-INF/classes/presto.config file for the MashZone NextGen Server in any text editor.
b. Add the property jems.ext.applications.dir=folder-path with the absolute path to the folder you want to use as the root folder for all application scopes.
c. Save your changes.
2. Create a subfolder for your application directly under the application-scope root folder (see previous steps for more information).
3. Add your classes or JARs in this subfolder and restart the MashZone NextGen Server.
4. Add application=your-application-subfolder to the <script> statement.
Copyright © 2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback