How to import a module

It is very important that a module is imported into the correct site, so take care to select the right site before importing the module.

To import a module into OpenCms, please follow these steps:

  1. Select Administration in the View selection of the OpenCms workplace.
  2. Open the Module Management:

  3. Click either on Import Module from Server or Import Module with HTTP :
    • Import Module from Server: use this option to upload the module from the WEB-INF/packages/modules/ directory of your OpenCms web application on the server.
      On the next dialog page you get a selection with the package names of all modules found in WEB-INF/packages/modules/ to choose from.
    • Import Module with HTTP: use this option to upload the module anywhere from your local filesystem (using http upload).
      On the next dialog page a file search dialog is shown and you can select the module's zip file in the local file system of your computer.
  4. Finally, click OK. The import starts, reporting which files and folders are imported.
  5. You might get an error or exception message during the import that tells you that you should do a restart afterwards. If so, do what you are told, and restart the OpenCms server after the last step. Be aware that you might have to restart the OpenCms server even if no such message is shown, see below for more details.
  6. After you have left the import dialog the wizard ends and you should find the imported module in the list of installed modules.

Restarting the OpenCms server after module import

A server restart might be required after you imported a new (or updated) module.

Some modules contain Java archives (JARs), class files or other resources that are automatically copied to the WEB-INF/classes/ or WEB-INF/lib/ folder of the OpenCms web application during the module import. Such modules usually require a restart of the OpenCms Servlet container so that the Java Classloader can load these new classes or resources.

The individual module documentation should contain a note if a module requires a server restart after installation. You will not always get an exception message during import if the module requires a server restart.

In case you upload several modules, one server restart is enough after uploading all modules.

Updating an already installed module

In case you upload a module that already exists on the server, the existing version is automatically replaced if the uploaded version of the module is the same or newer than the version installed on the server. What the replace does is first to delete the existing version and afterwards import the new version.

In case you have made changes to the module that is replaced, all these changes are lost! This applies to the additional resources of the module as well.