About web.xml Parameters

3DSpace Service installations include both the framework.properties file that has always been used to configure ENOVIA apps, and the web.xml file, which is built from web.xml.part files, and is used in more recent J2EE implementations. The web.xml file tells the server to look to the installation directory for framework.properties, but can itself include the very same property settings as parameters.

To remove the dependency of J2EE archive files on this external file, you should add all settings to a web.xml.part file instead of framework.properties. If a property is set in both places, the value in the web.xml file is used. Refer to Framework.properties for more information on its default settings.

This page discusses:

Starting in V6R2012, the web.xml file has been broken into parts, or fragments, named *.web.xml.part. These fragments are stored in the SERVER_INSTALL\PLATFORM\resources\warutil\fragment\ directory. If you want to add your own section to the web.xml file, you can do so by adding a fragment in this directory.

Some features, such as the timer servlet, are deactivated by default. These files are stored in the fragment\ directory as *.web.xml.part.deactivated. To activate an existing feature that is not activated by default, you simply rename the file to *.web.xml.part (i.e., remove the .deactivated extension). You can then modify the file to suit your needs. The following are the names of some of the parts that are provided out-of-the-box:

  • FRAMEWORK.timer_servlet.web.xml.part.deactivated—Timer servlet
  • FRAMEWORK.static_content_caching.web.xml.part—Static browser content cache
  • FRAMEWORK.parameters.web.xml.part—Main parameters

WAR Utility properties

In earlier ENOVIA software versions, some properties were modified by editing the ematrix.xml file to make the tool behave differently. In V6R2012 and later, the ematrix.xml file is no longer present and the desired values are passed using the following environment variables:

Previous property name in ematrix.xmlNew environment variable nameDescriptionPossible ValuesEquivalent warutil_setup Command-Line Options
createstaticzipWARUTIL_CREATESTATICZIPCreate a zip file Yes (default)

No

-z, -createstaticzip

-Z, -donotcreatestaticzip

createearfileWARUTIL_CREATEEARFILECreate an app server archiveYes (default)

No

-c, -createstaticcontentinwar

-C, - donotcreatestaticcontentinwar

staticcontentinwarWARUTIL_STAICCONTENTINWARPut static data in generated war archiveYes (default)

No

-e, -createearfile

-E, - donotcreateearfile

When adding properties or servlets, be sure that each has a unique ID. For example, servlet id="Servlet_20" or context-param id= "ContextParam_30".

As installed with the 3DSpace Service, the web.xml file is configured for use with ENOVIA apps and contains the properties and values shown below. Additional parameters may be added. Each of these properties, along with parameters that can be added to the file, are described in the following sections.

This is not the complete web.xml file -- only the parameter and servlet definitions are shown.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web 
Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
   <web-app id="WebApp_1">
      <display-name>ematrix</display-name>
      <context-param id="ContextParam_1">
         <param-name>properties</param-name>
         <param-value>@installDir@/managed/properties/framework.properties</param-value>
      </context-param>
      <context-param id="ContextParam_2">
         <param-name>ematrix.server.host</param-name>
         <param-value></param-value>
      </context-param>
      <context-param id="ContextParam_3">
         <param-name>ematrix.login.page</param-name>
         <param-value>/emxLogin.jsp</param-value>
      </context-param>
      <context-param id="ContextParam_4">
         <param-name>ematrix.login.failure.page</param-name>
         <param-value>/emxLogin.jsp</param-value>
      </context-param>
      <context-param id="ContextParam_5">
         <param-name>ematrix.web.app</param-name>
         <param-value>true</param-value>
      </context-param>
      <context-param id="ContextParam_6">
         <param-name>emxLogin.FormAction</param-name>
         <param-value>/@webAppName@/servlet/login</param-value>
      </context-param>
      <context-param id="ContextParam_7">
         <param-name>emxLogin.FrameworkTarget</param-name>
         <param-value>common/emxNavigator.jsp</param-value>
      </context-param>
      <context-param id="ContextParam_8">
         <param-name>ematrix.page.path</param-name>
         <param-value>/@webAppName@</param-value>
      </context-param>
      <context-param id="ContextParam_9">
         <param-name>ematrix.home.page</param-name>
         <param-value>/common/emxNavigator.jsp</param-value>
      </context-param>
      <context-param id="ContextParam_10">
         <param-name>ematrix.load.program</param-name>
         <param-value>eServiceListSchemaNames.tcl</param-value>
      </context-param>
      <context-param id="ContextParam_11">
         <param-name>ematrix.encoding</param-name>
         <param-value>UTF8</param-value>
      </context-param>
      <context-param id="ContextParam_12">
         <param-name>ematrix.audit.log</param-name>
         <param-value>true</param-value>
      </context-param>
      
<!-- legacy servlet properties
      <context-param id="ContextParam_13">
         <param-name>ematrix.servlet.ui</param-name>
         <param-value>true</param-value>
      </context-param>
      <context-param id="ContextParam_15">
         <param-name>ematrix.timer.agent</param-name>
         <param-value></param-value>
      </context-param>
      <context-param id="ContextParam_16">
         <param-name>ematrix.timer.agent.key</param-name>
         <param-value></param-value>
      </context-param>
      <context-param id="ContextParam_17">
         <param-name>ematrix.timer.interval</param-name>
         <param-value>21600</param-value>
      </context-param>
      <context-param id="ContextParam_18">
         <param-name>ematrix.timer.command</param-name>
         <param-value>execute program emxProjectSpace -method performTaskEscalation</param-value>
--><!-- Define our servlets -->
      <servlet id="Servlet_1">
         <servlet-name>Framework</servlet-name>
         <servlet-class>com.matrixone.servlet.Framework</servlet-class>
         <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet id="Servlet_2">
         <servlet-name>LogoutServlet</servlet-name>
         <servlet-class>com.matrixone.servlet.LogoutServlet</servlet-class>
      </servlet>
      <servlet id="Servlet_4">
         <servlet-name>MatrixXMLServlet</servlet-name>
         <servlet-class>com.matrixone.servlet.MatrixXMLServlet</servlet-class>
      </servlet>
      <servlet id="Servlet_7">
         <servlet-name>MatrixExchangeServlet</servlet-name>
         <servlet-class>com.matrixone.servlet.MatrixExchangeServlet</servlet-class>
      </servlet>
      <servlet id="Servlet_12">
         <servlet-name>LoginServlet</servlet-name>
         <servlet-class>com.matrixone.servlet.LoginServlet</servlet-class>
      </servlet>
      <servlet id="Servlet_15">
         <servlet-name>FrameworkServlet</servlet-name>
         <servlet-class>com.matrixone.servlet.FrameworkServlet</servlet-class>
      </servlet>
      <servlet id="Servlet_17">
         <servlet-name>WorkspaceServlet</servlet-name>
         <servlet-class>com.matrixone.servlet.WorkspaceServlet</servlet-class>
      </servlet>
      <servlet id="Servlet_18">
         <servlet-name>fcs</servlet-name>
         <servlet-class>com.matrixone.fcs.fcs.FcsServlet</servlet-class>
      </servlet>
      <servlet id="Servlet_19">
         <servlet-name>audit</servlet-name>
         <servlet-class>com.matrixone.servlet.AuditServlet</servlet-class>
         <load-on-startup>2</load-on-startup>
      </servlet>
Note: If you are running the 3DEXPERIENCE platform on the Cloud, you must redirect the call to the emxLogout.jsp page for an external CAS authentication upon logout.

Consequently, replace the following section of the web.xml file:

<context-param id="ContextParam_logout">
<param-name>ematrix.logout.page</param-name>
<param-value>/common/emxCloudLogout.html</param-value></context-param>

with:

<context-param id="ContextParam_logout">
<param-name>ematrix.sso.absolute.logout.url</param-name>
<param-value>#CAS_casServerLogoutURL#</param-value> </context-param>

where #CAS_casServerLogoutURL# may be, for example: https://vdevpril258plp.ux.dsone.3ds.com:453/iam/logout

WAR Utility return code

The WAR Utility returns the return code of the Java program. A successful build returns 0, while failed builds return other values. Build logs are available in the SERVER_INSTALL\logs\ematrixwar.log file.

Resource files

If you want to add a static resource to a web app, you must add the resource to the SERVER_INSTALL\PLATFORM\resources\ directory before launching the WAR Utility. This directory is also available via the symbolic link SERVER_INSTALL\managed\resources\.