JPublish and reverse AJAX; new demo
-application demonstrating how to monitor a text file (log, news,events, etc.) using reverse AJAX through the JPublishDWR module
For those of you interested in AJAX, especially in reverse AJAX ;) I
just committed to the SVN a very simple (and clean) JPublish demo
application demonstrating how to monitor a text file (log, news,
events, etc.) using reverse AJAX through the JPublishDWR module.
Obviously, you can easily tweak my code to monitor last n events from
a log file, or the newest transactions from a database, etc.
Also, for the impatient, I archived the complete application so you
can run it in no time. You can download it from the Downloads page:
http://code.google.com/p/jpublish/downloads/list and is called:
- simpledwr.war.zip
After you download the demo just be sure that, somewhere in a path, you
have a text file that you can edit and update, then modify the
home page of the application (content/index.html) and replace my path
with yours. See: FilePing.setFileName("/Users/flop/news.txt") ... and
replace /Users/flop/news.txt with the full path to the file you want to
monitor in your new and shiny AJAX enabled JPublish web application :)
Have fun!
