9.9.2 Defining a filter mapping
After adding the filter, you define the filter mapping.
- Organization of this subsection
(1) Attribute file to be edited
WAR attribute file
(2) Acquiring the attribute file to be edited and setting the attributes
-
Acquiring the attribute file
Execute the following command to acquire a WAR attribute file:
- Execution format
cjgetappprop [server-name] [-nameserver provider-URL] -name J2EE application-name -type war -resname WAR-display-name -c path-of-the-WAR-attribute-file
- Example of execution
cjgetappprop MyServer -name adder -type war -resname adder_war -c C:\home\adder_war.xml
-
Setting the attributes
Execute the following command to apply the values of the WAR attribute file:
- Execution format
cjsetappprop [server-name] [-nameserver provider-URL] -name J2EE application-name -type war -resname WAR-display-name -c path-of-the-WAR-attribute-file
- Example of execution
cjsetappprop MyServer -name adder -type war -resname adder_war -c C:\home\adder_war.xml
(3) Attribute settings to be edited
The following table describes the property settings of the filter mapping definition (<filter-mapping>) of Web application (servlets and JSPs):
Items |
Mandatory |
Corresponding tags |
---|---|---|
Filter name |
Y |
<filter-name> |
URL pattern |
Y#2 |
<url-pattern> |
Servlet name |
Y#2 |
<servlet-name> |
Filter application condition#1 |
O |
<dispatcher> |
- #1
-
This attribute cannot be set in a WAR file of a version earlier than Servlet2.3.
- #2
-
Specify either the URL pattern or the servlet name for filter mapping.
For details on the property settings, see 3.7.1 Specifications of the HITACHI WAR Property file in the uCosminexus Application Server Application and Resource Definition Reference Guide.