Setting up DISCOVER Server on Tomcat Engine
Software needed
- Apache Web Server
- Tomcat
- mod_webapp (forwarding requests from WebServer to Servlet Engine)
Step 1: Tomcat server.xml configuration file
Add a service connector for Tomcat-Apache, using className: org.apache.catalina.connector.warp.WarpConnector and specifying the AppBase for the web application root directory.
Step 2: Apache httpd.conf configuration file
Load module mod_webapp.so, add a webappconnection warpconnection to the servlet engine and port specified above. Add WebappDeploy for the directory located in the AppBase containing the WEB-INF directory, and specify the URL for deployment.
Problem encountered
When trying to download the JAR File from a URL specified by the WebAppDeploy command in httpd.conf, the Web Browser would not download the full-length JAR file but only a portion of it.
In order to circumvent this inexplicable problem, the JAR has to be made available for download from a path different from the one specified by WebAppDeploy.
When WebAppDeploy specifies '/' as the URL to mount the server files onto, Apache is then opaque to every other possible access since all the requests will go to Tomcat.
So WebAppDeploy needs to specify a path different than '/', this requires some of the hardcoded URLs to be modified in the DISCOVER files (LoginHandler, RegistrationServlet, MasterServlet, Client).