Spring-dashboard getting started

Spring-dashboard provides real-time statistic and monitoring view of a spring-framework web application. It does so by hooking into Spring web flow and gathering statistic information.

1) Set org.springdashboard.logic.MonitoredDispatcherServlet to be the dispatch servlet of your web application by configuring it in the web.xml. Here is how the web.xml looks like in the example war:



2) Configure the spring-dashboard beans in your spring application XML. Here is how the springdashboard-servlet.xml looks like in the example war:
<!– monitor bean – be sure to map this controller to a URL!! –>
<bean id=”webMonitorBean” class=”org.springdashboard.logic.WebMonitorBean”>
<!– how many history flows should the webMonitorBean keep in memory –>
<property name=”maxNumberOfFlows”>10

<!– Monotir view controller – be sure to map this controller to a URL!! –>
<bean id=”monitorViewController” class=”org.springdashboard.web.MonitorViewController”>
<!– the JSP that will present the XML data- default here is monitor.jsp –>
<property name=”view”><value>monitor</value></property>

<bean id=”MonitorDataController” class=”org.springdashboard.web.MonitorDataController”>
<property name=”webMonitorBean”>
<ref bean=”webMonitorBean”/>
<!– the JSP that will format the data to XML- default here is monitorData.jsp –>
<property name=”formeterJSP”><value>monitorData</value></property>

3) Default JSP’s for formatting the statistic data into XML and parse and presenting this XML (using AJAX) can be found in /example/ war/WEB-INF/jsp/ folder in the release. If you do not want to implement your own JSP, make sure to put these JSPs with your application JSPs
4) To view the statistic data open the URL you mapped MonitorViewController to.