Getting ready
Let's just brush up on our knowledge of web script building blocks and identify the components that need to be created for this web script as follows:
Each web script needs to have a description document. So, the first step is to create a web script description document.
The web script needs to return a response in the XML and JSON formats, so it is necessary to provide the response template to render an XML response and a response template to render a JSON response.
The entire logic to get the filesystem location and size will reside in the web script controller. In this case, a Java-backed web script controller needs to be created for business logic processing.
In order to register a Java-backed controller with the web script, a spring configuration is required. Hence, a spring context file needs to be created to register a Java-backed controller with the web script. It is not necessary to create a new spring context file always. You can have a context file based on the logical...