Promote Menu Data

This document is applicable for m-Power clients who connect to different databases for their development and production applications. In this case, developers often have challenges in migrating their menu data from their development database to their production database. This documentation will cover how to achieve this.

Exporting Menu Data

To begin, ensure that your “Application Menu and Security” looks like the following:

If it does not, please consult this document to learn about converting your menu.

Click on the “Promote Menu Data” button.

You will most likely want to promote all of your menuing data, so click the “Select all” link, then press “Export Selected Data.” Once successful, you will see a green success message.
Note: If you’ve modified any of your MRCSEC objects to be views, please do not select them as this will cause the import process to fail.

On your m-Power server, we have created for you a file in /mrcjava/WEB-INF/data/ with a name of “menu-export” plus an EPOCH time. This file should not be edited. You will need to move this file into the same location within your production instance.

Importing Menu Data

The process of allowing data to be imported into your production instance is disabled by default. To enable it, please add the following code to your production /WEB-INF/web.xml file, directly before the tag:

<servlet>
<servlet-name>ImportData</servlet-name>
<servlet-class>mrc.ImportData</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ImportData</servlet-name>
<url-pattern>/servlet/mrc.Migrate</url-pattern>
</servlet-mapping>
<security-constraint>
<web-resource-collection>
<web-resource-name>mrc Data Migration</web-resource-name>
<url-pattern>/servlet/mrc.Migrate</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>manager-gui</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>DIGEST</auth-method>
<realm-name>mrc Data Migration</realm-name>
</login-config>

Once completed, save your changes and restart Tomcat.

Assuming your production instance is at 1.2.3.4, direct your browser to:
You will be prompted to log in. Unless you have already changed (recommended), the user of mrcuser/mrcuser will allow access.
Note: Any user in the manager-gui role as defined in /m-power/tomcat/conf/tomcat-users.xml will have access.

Once authenticated, you will see the following screen:

Select the file you would like to import into the production database, and click Import. During this process, m-Power will create the files on your production database, if they don’t already exist. If they do, m-Power will adjust the existing data accordingly and update the production database.

Updated on September 28, 2021

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support