| java.lang.Object javassist.tools.web.Webserver sample.evolve.DemoServer
DemoServer | public class DemoServer extends Webserver (Code) | | A web server for demonstrating class evolution. It must be
run with a DemoLoader.
If a html file /java.html is requested, this web server calls
WebPage.show() for constructing the contents of that html file
So if a DemoLoader changes the definition of WebPage, then
the image of /java.html is also changed.
Note that WebPage is not an applet. It is rather
similar to a CGI script or a servlet. The web server never
sends the class file of WebPage to web browsers.
Furthermore, if a html file /update.html is requested, this web
server overwrites WebPage.class (class file) and calls update()
in VersionManager so that WebPage.class is loaded into the JVM
again. The new contents of WebPage.class are copied from
either sample/evolve/WebPage.class
or sample/evolve/sample/evolve/WebPage.class.
|
|
|