The release is at the same location:
http://homepage.mac.com/taweili/XMLC.html
David
On Thursday, Nov 28, 2002, at 01:31 Asia/Shanghai, David Li wrote:
The release fixes several bugs and updates several helpers classes to
ease the integration of XMLC in a servlet containers. This new release
contains an example webapp using the new reloading for XMLC which can
be easily deploy under Tomcat containers. (nothing Tomcat specific
about it but I just have time to test it on Tomcat.)
The attached is the README for the example.
David
---
This is an example program to demo how to use XMLC in a Servlet. The
example is use Tomcat 4.1.12, other containers have not been tested.
Configuration:
Copy the 'build.properties.examples' to 'build.properties' and edit
the two properties according to your local setup.
Build:
Simply 'ant'
Running:
A script run-tomcat.sh will be created in this directory. Just type
$ ./run-tomcat.sh
Accessing the demo:
The demo servlet is located at /xmlc/ReloadTest and can be access
with
http://localhost:8080/xmlc/ReloadTest
The servlet expects a 'docClass' or a 'doc' parameter pointing to
the document to be retrived.
The 'docClass' parameter points to a fully qualified classname of a
XMLC compiled page. Currently available document class are:
Compiled from res/pkg,
xmlc.demo.test01HTML
xmlc.demo.test02HTML
Compiled from res/page
xmlc.page.page01HTML
xmlc.page.page02HTML
Example:
http://localhost:8080/xmlc/ReloadTest?docClass=xmlc.page.page02HTML
The 'doc' parameter points to a relative path name of a page to be
compiled and retrieved. These pages do not have to be precompiled by
XMLC in order to be loaded and use as a XMLObject. Currently
available documents are:
dyna/dyna01.html
dyna/dyna02.html
The following pages are the source of the above compiled XMLC
class. They can be loaded with the following path name. However,
loading them will only return a XMLObject, not the above named
class/interface.
page/page01.html
page/page02.html
pkg/xmlc/demo/test01.html
pkg/xmlc/demo/test02.html
Examples:
http://localhost:8080/xmlc/ReloadTest?doc=dyna/dyna01.html
ReloadTest source:
The source code for ReloadTest servlet is located under
src/xmlc/demo/ReloadTest.java. This file demostracted the use of the
following class:
org.enhydra.xml.xmlc.servlet.XMLCContext:
This is a convenient class to integrate XMLC with Servlet. It
configure the XMLCFactory with parameter from Servlet
context. In this demo, the configuration is done in
res/webapps/xmlc/WEB-INF/web.xml for the XMLC WebApp. The
document on the parameters can be found in the javadoc of
org.enhydra.xml.xmlc.servlet.XMLCContext.
This class also provides methods to serialize of XMLObject
object to the response with various of configuration.
org.enhydra.xml.xmlc.deferredparsing.XMLCDeferredParsingFactory:
The dynamic page loading using method the createFromFile which
is specific to this call and not in XMLCFactory. The use of this
method is demo here.
_______________________________________________
XMLC mailing list
XMLC@xxxxxxxxxxx
http://www.enhydra.org/mailman/listinfo.cgi/xmlc
|