Table of Contents
Source Code
The java source code, log4j and database properties file, which stores the configuration data, is found in web/WEB-INF/src. Log4j provides specific logging properties within the application. Once captured, the information can be used for debugging, and troubleshooting. By default the logging information is shown in the console. If you want to store it, just uncomment the commands in the log4j.properties file and change the path where you want to store them. For further information go to the Log4j.
Client software is found in the web directory. This includes the main index.jsp, the included legend.jsp, images and css style sheets.
Test Code
Junit tests are found in the tests directory, which includes a properties file for tests. Each new group of tests that is created needs to be added to the AllTests java file to get it to be executed automatically. A new test should be written for each new piece of functionality.
Structure of Code
Client Side
The client side application runs Index.jsp which includes the Legend.jsp code for the Legend part of the display. The user enters information to specify the information to be included in the graph and legend (eg date range). When the Draw Graph button is clicked, the GraphServlet is invoked on the Server with the parameters for the generated request passed within the URL. The RequestParams Class is used to store and validate these parameters. The deafult behaviour after the submit button is call index.jsp again which will redisplay the graph and legend reflecting the entered parameters.
Server Side
GraphServlet extracts the parameters from the request and calls GraphFactory to create the graph.
