|
Re: XMLC 2.2 Alpha 2 and Examples released (Download location): msg#00128java.enhydra.xmlc
Hi David, Turns out that I am able to get it to build. I also had to remove xerces-1.4.4-xmlc-2.1.jar from JAVA_HOME/jre/lib/endorsed which I have there for Building Barracuda/XMLC-2.1 apps. I also had to remove XercesImpl.jar from ANT_HOME/lib. The xml-apis.jar was fine to leave there. Note that previously with xerces-1.4.4-xmlc-2.1.jar in the endorsed directory I didn't have to remove the existing Xerces jar from ANT_HOME/lib since the Xerces I put in the endorsed dir overrode Ant's local version of Xerces. I guess this situation isn't too bad, but Ant-1.5.1 comes with Xerces-2.x.x and telling users to delete XercesImpl.jar from ANT_HOME/lib when other apps might need that existing isn't so good. Also, I am concerned about the fact that putting the Xerces version that come with XMLC into Java's endorsed dir doesn't work. I wonder if it has to do with the fact that we can't specify a classpath on the <xmlc ... /> task? Hmm.... Weirdness abounds with this classloading stuff. Anyway, now that I can build I guess I'll check this reloading stuff out! later, Jake At 05:07 AM 11/29/2002 +0800, you wrote: Hihttp://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 _______________________________________________ XMLC mailing list XMLC@xxxxxxxxxxx http://www.enhydra.org/mailman/listinfo.cgi/xmlc </blockquote></x-html>
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | problems with XMLCVersion.java, Mark Diekhans |
|---|---|
| Next by Date: | Re: XMLC 2.2 Alpha 2 and Examples released (Download location), Jacob Kjome |
| Previous by Thread: | Re: XMLC 2.2 Alpha 2 and Examples released (Download location), David Li |
| Next by Thread: | Re: XMLC 2.2 Alpha 2 and Examples released (Download location), Jacob Kjome |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |