From: Matthew B. <mat...@ou...> - 2006-03-23 13:57:29
|
Jon Maber wrote: > Alexis O'Connor wrote: > >> Jon Maber wrote: >> >>> Peter Crowther wrote: >>> >>>>> From: Jon Maber >>>>> By the way - what is a JSP page? Yes, you got it - a servlet. >>>>> >>>> >>>> >>>> >>>> Then you are using the term 'servlet' in a remarkably idiosyncratic way >>>> that will not aid communication with the other software developers on >>>> this list. >>>> >>>> >>> JSPs are compiled to Servlet classes. Ie. they build on a well >>> established spec. for taking a request and producing a response. >>> >> >> Hmmm... so why don't *we* just use JSPs? > > > Historically because Bodington predates JSP. Theoretically - no good > reason not to use them. Practically, quite a lot of careful thought > would need to go into it. > > Basically I'd be very much in favour of JSPs in place of Bodington > templates. I currently have a new reserved prefix (bs_spring) that gets handled by BuildingServlet (just as bs_template does) and then rather than BuildingServlet handing off control to the template the request gets forwarded to the spring dispatch servlet which examines the request and looks for the Facility associated with the request and the page name. It then uses this information to decided which controller to route the request to as a result. The controller is just a normal SpringMVC controller (similar to an struts Action). This controller then builds a Model and decides which view to use. The dispatch servlet then gets controll back and then hands off control to the view. Currently I use JSPs for views with template taglibs and spring taglibs, it is only here that the HTML is outputted. Stuff that isn't working is commons-validation and documentation on how to write new pages. Facilities are only used for deciding which controller to user but no Facility code is called. Database access still goes through BuildingSessions. A snapshot of my current state of work is at: http://users.ox.ac.uk/~buckett/weblearn-spring.tgz Comments. -- -- Matthew Buckett, VLE Developer -- Learning Technologies Group, Oxford University Computing Services -- Tel: +44 (0)1865 283660 http://www.oucs.ox.ac.uk/ltg/ |