http://www.perlmonks.org?node_id=939642


in reply to perl script handled by java

Tomcat supports CGI, so an AJAX call to the Perl script within the JSP template is one possible workaround.

print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."