From: Matthew B. <mat...@ou...> - 2006-06-21 13:17:52
|
Ian Boseley wrote: Capitalised words refer to the Java class (Facility is org.bodington.servlet.facilities.Facility). > I am completely new to Bodington. However I am having diffculty trying > to understand how the system hangs together and generates the html > pages. I have been looking into the code and it doesn’t seem very > intuitive. Is there any documentation available, including a database > schema, for developers? Quick Description: For URLs starting /site/ Request comes in and gets passed to BuildingServlet. BuildingServlet wraps request and response in Bodington specific wrappers. The request wrapper looks at the URL tries to load the Resource associated with that part of the tree. This can then be mapped onto a Facility which provides webby stuff. The the request tries to work out how to handle the URL (commented in Request), basically bs_template URLs map to templates (/tomcatadd/webapps/bodington/templates), bs_generated map to internally generated files, bs_virtual map to content purely outputted by Java. For bs_template requests the corresponding template is loaded (bs_template_main.html would load main.html) which is in the folder associated with the Facility (default folder is the fallback). Once the correct template has been located it is compiled into Java control is then passed to the compiled template. This will then probably make calls back to the Facility to output stuff dynamically. The database schema is built by the Installer which pulls it from lots of individual SQL files. > I have scoured the bodington Wiki and the bodington.org site but there > seems to be little information generally available for the developer. There isn't all that much :-( > I have imported the source into my deveolpment environment, eclipse, but > am unable to deploy locally to my tomcat server. I have been building a > .war file using the build.xml everytime I want to see what affect a > change I have made to the look and feel of the site which is really > slowing the process down. Do you have the src download or a checkout from CVS? When doing development I normal just use the build.xml. I copy sample.build.properties to build.properties and setup with the configuration for my tomcat install. Then I run the quickstart-database-create task quickstart-database-config task and then run the deploy-local task. This should then deploy Bodington to your local copy of tomcat. Then the reload task should allow the context to be reloaded. > Can somebody tell me the file/package structure I need in eclipse to > deploy directly to my local Tomcat installation? Are you using MyEclipse? There isn't a full webapp folder than can be deployed straight into the container. The build.xml creates a useable webapp folder under /build/webapps/bodington by copying in the basic webapp folder from /tomcatadd/webapp/bodington/, the web.xml from /etc, the external libs form /lib and the complied classes from /src -- -- Matthew Buckett, VLE Developer -- Learning Technologies Group, Oxford University Computing Services -- Tel: +44 (0)1865 283660 http://www.oucs.ox.ac.uk/ltg/ |