Goodday to you all. I needed a simple multithreaded lightweight ServletRunner written in pure java that wasn't going to bloat my system. Index: 1) Compliance 2) Running 3) Extensions 4) Examples 5) Extended examples 6) GenericServlets 7) Ejbs 8) Acknowlegements 9) Problems/Support/Faq 0) Contact: Compliance: This servlet runner runs extracted ear and war files, sorry for no jar class loader, I haven't got around to thinking about doing that yet, as I see this servlet runner mainly being used by developers during development. It can be run under any JavaVM from 1.1 and above. jview from microsoft is included in this list. If you choose a 1.2 or above JavaVM you will get dynamic reloading of the Servlet classses as you change them, by recompiling them, else in a 1.1 JavaVM you will not have this functionality. Dynamic reloading is always on if it is available. Sessions and Cookies are supported. but mmaybe a bit dodgy. Xml descriptors for ear and wars are reload dynamically as they are altered and saved and rehit by your servlets, so as to speed up the cycle of java server/let development. All you need is servlets.jar (bundled) and my classes. Running: goto the 'cehbab's code' directory where everything is exctracted for you. java -classpath .;servlets22.jar anyware.util.servlet.Runner [application.xml] to launch the servlet runner. (or run.[bat/sh] [/?]) application.xml contains ServletConfig properties for your ear file for modules. Each module points to a web.xml from a war file that contains the servlets descriptors themselves. Extensions: As an extension to the regular 'web' and 'ejb' module types, I have extended the standard j2ee ear descriptor a little without breaking it hopefully. Attributes port and ip have been added to the module node to assign the port and ip to BIND the Reciever to, and also a new node has been added to web modules, that describes the virtual webhost you are trying to hit! A new module type of 'raw' has also been added that enables full support of GenericServlet implementations at last!. 'raw' modules take a few nodes, which can be either tcp, udp or multicast. 'raw' modules also have a node that points to it's war descriptor. Examples of each of these GenericServlet implementations have been included, see anyware.xml for pointers to these classes. Examples: The following two examples should run under any servlet runner. Note: make sure ear descriptors are setup for these examples or you could pull your hair out! http://localhost:1080/servlets/HelloWorld http://localhost:1080/servlets/files/LOGO.gif Extended examples: http://localhost:1081/servlets/iXml http://localhost:1081/LOGO.gif The extended examples rely on a few things being configured correctly. NNTP needs it's NNTP.properties newsip property set to a valid public nntp server. http://localhost:1081/servlets/NNTP It supports both html and wml output, very strangely, but still minimalistic. eg http://localhost:1081/servlets/NNTP?doctype=wml GenericServlets: The following example servlets are implementations of GenericServlets. They allow clients other than html browsers access to the wonderous world of servlets. telnet localhost 1023 ftp localhost 1021 dns localhost 1053 Once again please see application.xml and it's pointed to 'raw' module uri's, for example dns needs a valid dns server it can reach, and ftp has a changeable ftp connect message for ftp clients! When connecting to the telnet servlet, cd anyware\n cd test\n cd CMDS\n ls\n to list current commands, and enjoy. Ejb support: Please download ServletRunner1xExtensions.zip and read the readme inside of this archive. If you run this servlet runner with the ejbs option from the run command, or via a 1.2 JavaVM and including j2ee.jar and your appropriate ejb containers jar files, client and server maybe?, this servlet runner successfully connects and can use ejb's. Support here is via your supplied support jars, see ServletRunner1xExtensions.zip for an example of this that connects to a JBoss-2.2.1 distribution right out of the box. Simply run or change accordingly anyware/test/ejb/TestEJB/build.bat to create an example Anyware_TestEJB.jar that you can deploy into your favourite ejb container. Acknowlegements: tiny xml - by Tom Gibara (tom@srac.org) project homepage - http://gibaradunn.srac.org/tiny/ tiny xml is a very small lightweight non-validating xml parser written with no limitations. I have been using Tom's TinyXML package for well over a year now and have extended it personally for my own benefit, no one elses, and for the benefit of iXml. Please see Support section for details on the selection of Xml parsers. jboss - by the jboss group project homepage - http://www.jboss.org/ JBoss is an Application server like this Servlet Runner. It is very good at being an ejb container and so it gets credit for that here!. Check out my notes in the ejb section of this file, and also the ServletRunner1xExtensions.zip archive for hints on JBoss and this ServletRunner. jdns - by Brian Wellington (bwelling@xbill.org) project homepage - http://www.xbill.org/dnsjava/ >>>this package ROCKS! I tell you, dns is huge. Unfortunately I needed examples of Serverlets and I cannot implement dns classes to that extent so I ripped the Message and Header classes and packaged them into my stucture for simplicity only. Acknowlegement is going HERE<<< and I use them only to construct a simple DnsServlet you can use on internal networks without a decent gateway. Problems/Support/Faq: Xml Parsing is not validated correctly. The TinyXML Parser will report errors such as {mismatched node} and so on, very simple messages for you. this means that it will only work when your xml descriptors are correct, but is not very handy at telling you what went wrong. This should be extended by using a validating xml parser, and will be included soon for better j2ee compliance. But since this still runs in a 1.1 JavaVM , TinyXML is very sufficient for this servlet runner to do it's job. If you set a web module to a port other than the default of 80, and set it to a virtual web host, then your MUST include the port or it will not match the desired virtual web host, eg 10.61.0.200 <- port 80 eg 10.61.0.200:1080 <- any other port If you are using nat redirection, and your Servlet Runner is running internally on your network, you must think about what the 's will be. No web-host is also supported and any host requested by the client at your servlet runners ip address will be ignored. Contact: project homepage http://cehnet.sourceforge.net contact craighuggins@hotmail.com and check out my other projects on sourceforge! (included in this distro is http://ixml.sourceforge.net) homepage http://anyware.mine.nu click on the i for information ;)