Qwicap 1.4b0 corrects a bug that may have interfered with Tomcat shutdown, and a bug that caused newline characters within HTML "textarea" tags to be encoded. In addition, it simplifies web application setup by eliminating the requirement to include the "qwicap.css" style sheet in web applications, and, for convenience, it provides access to Qwicap's internal pseudo-random number generator.
Links to all of the documentation, source, etc. can be found on the Qwicap main page. I have also, at long last, placed the source code into a Subversion repository on SourceForge. I have doubts about whether I've structured the repository in a way that I'll be satisfied with in the long run, but there it is. (Even in the short run, I didn't intend to include the compiled classes in the repository, but there they are, despite my best efforts to delete them.)
Not documented anywhere (except here, obviously) is the fact that version 1.4b0 contains the germ of a new feature that adds the first elements of AJAX technology to Qwicap. (In the interest of reliability, I have no intention of ever making Qwicap depend on AJAX, or scripting in general, but I am open to using those technologies to provide non-critical, optional enhancements.) The immediate goal of this work is a feature that will cause pages in client-side caches to visually reflect their changing status as valid, or invalid, targets for user interaction when the user goes back to them. It is implemented using Javascripts that are automatically embedded in each web page. At present, those scripts are fully functional only in Firefox version 2. My best efforts to make them work in Safari 2.0.4 have failed utterly, and I currently hold no hope of being able to improve on that. However, they come close to working in the current WebKit builds; the remaining problem seems to be that the changes my scripts make to a document's DOM are not rendered. Plainly, that's not good enough for a "real" feature, so it is disabled by default. However, the brave may enable it using the Qwicap.setScriptsEnabled
method. You'll want to enable it before your application sends its first web page to the client in order to get consistent behavior for all pages.
By the way, those wishing to add their own application-specific AJAX functionality into their Qwicap applications can do so by creating a FormDataSetFilter
to intercept and reply to the asynchronous inputs from their scripts. Just remember to commit your response by closing the output stream before returning from the filter. Such filters are executed within the full context of your Qwicap application, so they have access to all of your accumulated state (with the obvious exception of the local variables in your blocked methods, which can't be in your filter's scope). May you have better luck with your scripts than I've had with mine thus far.
Change Log for Version 1.4b0
- Corrected the handling of newline ('\n') characters within the content of HTML "textarea" tags. Previous versions of 1.4 had replaced those newlines with "br" tags, which was incorrect. Newlines in "textarea" tags are now left as they are; they are not encoded. In this respect, "pre" and "textarea" tags are now handled identically.
- Added a few more JUnit tests, and improved a few others.
- Added the
Qwicap.getRandom
method to make available to client applications Qwicap's internal pseduo-random number generator instance. - Updated the "guess" and "wumpus" example applications to use the
Qwicap.getRandom
method. Also, removed the "wumpus" application's dependence on the "servlet.jar" library file, and duly removed that file from the distribution. - Corrected a bug that may have caused Qwicap to interfere with normal Tomcat shutdown.
- It is no longer necessary to include the "qwicap.css" style sheet in Qwicap applications. Qwicap will now supply that document automatically. However, it remains necessary for an application's style sheet(s) to import the "qwicap.css" style sheet, unless it overrides all of Qwicap's styles. Applications may still override the default Qwicap styles in their own style sheets, of course, and may outright replace the default "qwicap.css" style sheet, if they prefer, by providing a document of the same name in the application's top-level directory.
- Various Javadoc improvements, chiefly in classes that are not part of Qwicap's public API.
- Corrected an error in a Javadoc block and in a separate comment in the
QwicapServlet
class. The word "send" in both cases had been transformed into "sendFile" due to some overzealous refactoring in the distant past. These corrections have no functional significance, but do make a little bit of the documentation more comprehensible.
No comments:
Post a Comment