What would be the disadvantages of implementing a larger and feature-richer server using this class?
I found I had to write my own code to find the HTML and Javascript files, map their names to URLs the users could access, and read these files and send their content when the associated URL was requested. Is this normal? Isn't there a way to just say "serve all files in this directory"?
Aren't there Javascript functions and Java methods for creating and reading tree-like or graph-like data structures, which can be written/read as XML under the hood, without the programmer needing to process the message content directly?
Sometimes I found that the
XMLHttpRequestwasn't sent successfully unless I added a 0.5s wait usingsetTimeout, before sending the request. I can do more testing and get more detail if necessary, but does anyone know what could be going on there?