Info: Performing the step described in this article requires direct server access. Depending upon how your system is hosted and the level of access you have to that system, coordination may be required with your Partner or WoodWing Support team. For a full overview of the steps that need to be done by WoodWing and how to request them, see WoodWing Cloud - Change management.
Note: This type of plug-in is not supported on the on-premise version of Assets Server and on Assets for WoodWing Cloud. We advise to host this type of plug-in externally and independent of the server.
You can serve Java webapps (.war files) on an Assets Server by placing them in subfolders of Config/plugins/active. Both .war files and directories with ./WEB-INF/web.xml files are supported. All directories and files starting with a dash ( - ) are ignored and are not scanned.
The server scans and subsequently deploys webapps on startup and every time the plug-ins are reloaded from Assets. The webapps are registered with the Jetty webserver that is embedded in the Assets Server.
Webapps are available under the <serverUrl>/plugins/path_below_active_plugins context path. For example:
- Config/plugins/active/someplugin/mywebapp.war is hosted at http://example.com/plugins/someplugin/mywebapp
- Config/plugins/active/anotherplugin/folder/webapp-dir/WEB-INF/web.xml is hosted at: http://example.com/plugins/anotherplugin/folder/webapp-dir
Some init parameters are passed to the webapp:
elvisServerVersion | The version of the Assets Server. |
elvisContextPath | The context path where the Assets Server runs, usually root: "". |
elvisPluginContextPath | The context path of this plug-in. /plugins/someplugin/mywebapp in the example above. |
elvisPluginLocation | The location of the plug-in webapp on disk. |
These can be accessed from JSP files:
<a href="${initParam.elvisContextPath}/install">Open client install page</a>
Or from the ServletContext:
ServletContext application = config.getServletContext();
File file = new File(application.getInitParameter("elvisPluginLocation"), "my-plugin-config.txt");
Comment
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
0 comments
Please sign in to leave a comment.