Angsuman's Java Blog

News and views from my perspective as a Chief Software Architect and CEO. Focused on Java and Web Technologies.


Wednesday, December 25, 2002

Playing with JDOM, created a random quotes server. Please check out: http://www.mycgiserver.com/~angsuman/quotes/quotes.jsp and let me know what you think. It get the quote feed in xml format from an URL, validates with the associated DTD, and then uses JDOM to fetch a single random quote and displays it using XSLT. You can look at all the quotes in XML format or check out the source jsp file.
The corresponding style sheet and dtd is also available online. The quotes can also be specified from another location. However in this optimized version using Templates, only the first time the program is run, the location of the quotes is checked and uploaded from. This makes the program faster in serving quotes. To change the default behavior and load the quotes everytime comment the line: inited = true.