Adding a Context Parameter to an Implementation of Type WAR
Before you beginFor more information about context parameters, see the "Context Parameters" section of TIBCO ActiveMatrix® Service Grid Java Component Development. The steps specific to a WebApp component (with implementation type of WAR) are listed in this section.
- Procedure
- Add a context parameter to the servlet class as follows:
@Context public ComponentContext componentContext;
- For a WAR file that uses the
@Context
annotation, copycom.tibco.amf.platform.common_1.4.0.001.jar
andcom.tibco.amf.platform.runtime.extension_1.6.0.004.jar
from <TIBCO_HOME>/component/shared/1.0.0/plugins to the system's %temp%/.SDSWAR-<WAR filename>/WEB-INF/lib folder. - Clean the SOA WebApp project using Project > Clean and rebuild it.