The "Servlet Parser" generates multi language Java-Servlets from an XML-file. This tool is used in the Asgaard-framework built on pure Java components. The focus is on having an automated connection to static and dynamic HTML-contents for easy maintainable WWW-documents.What is a Servlet Parser?
A Servlet-Parser is a pure Java-utility which generates a pure Java Servlet from an XML definition file. It is similar to JSP (Java Server Pages) but is completely based on valid XML constructs. The output are pure Java-servlets without the need of proprietary middleware-server. All it needs is a JDK including the servlet-package and a servlet-enabled WWW-Server. The parser itselfe is based on the W3C-DOM (Document Object Model) classes which are as well open-source.
Why using a parser?
It is not very difficult at all to write a Servlet in Java. However, it is difficult to maintain the content of a document and to keep the performance of the servlet up using some tools. Here are some advantages using a parser based on an XML-definition:
- The content is easy to maintain and there is multi language supports available;
- There are many possibilities to get dynamic content into the produced documents with a high performance, because the output is fast Java-code;
- The definition of an servlet is based on an XML file which may be supported by any available XML-tool and may be easily extended for other purposes like adding test-code;
- There is no need for any proprietary software or file-formats. All you need is included with this distribution.
When is it Useful to Use this Tool?
- If there is a strong relationship between static and dynamic content of the produced documents;
- If you need multi language support;
- If the advantages of Java-servlets in combination with the full access to all the code is recommended;
- If it is possible to use inheritance and code-delegation to avoid large amounts of Java-code in the XML-definition file (what would decrease the maintainability of the code);
Limitations
Of course, there are some disadvantages at this early stage of development:
- Both - HTML- and Java - codes have to be developed and tested in some external IDE before they are integrated into the definition file. (Of course, if you are able to imagine the output, they can be edited in the document too);
- This code has to be split up manually to separate HTML structure, HTML content and Java-code. On the other hand the disadvantage is the supposition for high performance;
For some more reading click here.
Complete Distribution
The Distribution is under GNU public license Version 2; there is absolutely NO WARRANTY on this software.A complete distribution contains one compressed zip-archive
- serv.zip 1.0.1 experimental release
Documentation Only
For a more detailed online documentation click here and there is also a printable version in pdf.Requirements
- SUN JDK 1.1.6 or higher
- WWW-Server supporting Servlet (like Apache) or SUN's Servletrunner
Sorry, there is no support on this software yet, but feel free to send all your remarks, bug-reports and ideas to klaus@ifs.tuwien.ac.at. I hope that this piece of software may help you.