| Path: | gradesheet-server.rb |
| Last Update: | Tue Jul 26 14:31:53 EDT 2005 |
WEBrick server to supply class gradesheet information. Copyright (C) 2005 by Allyn Dimock
Produces a servlet processing https on the port given by the constant PORT with root given by the constant ROOT. Constant SHEETS is an array of hashes giving the information about the sheets that are available:
| PORT_NUMBER | = | 8080 | Port number of server (default https port number = 443) | |
| ROOT | = | "/OOCalcGradesheetDocs" | URI doesn’t use a real file name | |
| CERTIFICATE | = | [ ["C","USA"], ["O","cs.uml.edu"], ["CN", "OocalcGradesheetViewer"] ] | Certificate: self-certified | |
| SHEETS | = | [ {:id => '301f03', :file => "~/earth/grade301-F03/gradesheet.sxc", :fixed_rows => [1,2,20,21], :id_column => 0}, {:id => '531f03', :file => "~/earth/grade531-F03/roster.sxc", :fixed_rows => [1,35], :id_column => 1} | Gradesheets to serve: resource name, file name, rows to always return, id column |
Start the web service: Create SpreadsheetContent.new for each sheet in SHEETS, Start web server Mount a resource for each gradesheet being serviced.