The administrative servlet classes are integrated with the
Assembler. To access the servlet in an application, you must configure the
servlet path and class in the application's
web.xml
deployment descriptor file and define the
service in the Assembler context configuration file.
To configure the Assembler administrative servlet:
Stop your Web application container.
For Guided Search reference applications, this is controlled through the Endeca Tools Service.
Define the admin servlet, referencing the
com.endeca.infront.assembler.servlet.spring.admin.SpringAdminServlet
class and setting a value for theadminServiceId
:<servlet> <servlet-name>admin</servlet-name> <servlet-class>com.endeca.infront.assembler.servlet.spring.admin.SpringAdminServlet</servlet-class> <init-param> <param-name>adminServiceId</param-name> <param-value>adminService</param-value> </init-param> </servlet>
Note
The value of the
adminServiceId
parameter corresponds to the JavaBean ID in the Assembler context file.Create the servlet mapping, using the servlet you defined in Step 4:
<servlet-mapping> <servlet-name>admin</servlet-name> <url-pattern>/servlet/admin/*</url-pattern> </servlet-mapping>
Optionally, configure performance monitoring for the HTTP request/servlet request level.
Map a
com.endeca.infront.assembler.perf.PerfEventFilter
filter to the HTTP request:<!-- The PerfFilter must go after the RequestContextFilter so it can have access to the request --> <filter> <filter-name>PerfFilter</filter-name> <filter-class>com.endeca.infront.assembler.perf.PerfEventFilter</filter-class> </filter> <filter-mapping> <filter-name>PerfFilter</filter-name> <url-pattern>*</url-pattern> <dispatcher>FORWARD</dispatcher> <dispatcher>REQUEST</dispatcher> </filter-mapping>
This causes the performance statistics page to report the latency for all operations on the page, instead of just those included in an
assemble()
call.Open the Assembler context file for your application.
For example,
C:\Endeca\ToolsAndFrameworks\<version>\reference\discover-electronics\WEB-INF\assembler-context.xml
.Define a administrative service bean of class
com.endeca.infront.assembler.servlet.admin.AdministrationService
:Set the
id
attribute to the value of theadminServiceId
parameter set in Step 4:<bean id="adminService" class="com.endeca.infront.assembler.servlet.admin.AdministrationService"> </bean>
Set the
storeFactory
<property>
as shown below:<bean id="adminService" class="com.endeca.infront.assembler.servlet.admin.AdministrationService"> <property name="storeFactory" ref="storeFactory"/> </bean>
This property is used to retrieve the registered
FileStoreFactory
for the servlet'sop=update
operation.