From: Brad Cox Date: 2002-04-10T22:41:22+09:00 Subject: How to obtain load path from a class? I'm building a web app environment in which web pages are singleton instances of Page classes, defined like this require "OtherPage" class SomePage < Page send(%Q{

Hello world

Click #{link(OtherPage, "here")} to proceed. }) end The servlet context (request, response, etc) is held in the Page instance, whish is thus instantiated at dispatch time. This works fine. The problem is that links between pages are emitted before dispatch time, by sending link or form messages with the target class as an argument (see above). This requires that the path from which the destination class was loaded be determinable from the class name, to generate the appropriate string. So far I've been unable to find a way to obtain the load path from the class constant alone. Is this possible? Can someone help? Thanks! -- Brad Cox, PhD; bcox@virtualschool.edu 703 361 4751 o For industrial age goods there were checks and credit cards. For everything else there is http://virtualschool.edu/mybank o Java Interactive Learning Environment http://virtualschool.edu/jile o Java Web Application Architecture: http://virtualschool.edu/jwaa