Java Projects

Java Libraries

Expression Evaluator

A library to parse and evaluate mathematical expressions,
including the ability to call functions implemented (by you)
in Java.

Updated 2008-06-20: released under the GNU
Lesser General Public License (LGPL).Updated 2009-04-09: fixed parser bug which allowed trailing
junk in the expression to be ignored. Also updated to junit 4.5.

Get the binary and source
(1.3MiB zip or
850KiB tar.gz
- includes source, javadoc, pre-built JAR, and dependent
libraries - ANTLR, jmock and junit).
See the Javadoc.

zipcodes

A Java library (and data files) for looking up US postal codes
and performing distance operations on them.
(Updated 2007-04-25: latitude and longitude were being read
from the data file inverted).

A Java library that allows developers to easily test code that
uses Java's java.net.URL class to access resources. It provides
a URL protocol that will return object that the developer can
control by implementing an interface.

Once you have the include files mentioned above, you can simply
copy the JSP file into your
webapp and start using it. I recommend limiting access to it,
since it can display a lot of information about your running
application.

RequestDumper

Similar to the SessionSnooper, RequestDumper allows you to browse
request headers, parameters, and attributes.

For debugging purposes, you could put it at the end of a request
forwarding chain to verify your assumptions about the state of
the request at the end of processing.

Once you have the include files mentioned above, you can simply
copy the JSP file into your
webapp and start using it. I recommend limiting access to it,
since it can display a lot of information about your running
application.

AdHocQuery

Allows users to submit ad-hoc SQL queries to their database and
display the results in HTML form.

It requires that you also have
htmlescape.jsp
in the same directory so it can be included.

Once you have the include file mentioned above, you can
copy the JSP file into your
webapp. You will have to modify the getConnection
method to suit your needs.
I highly recommend limiting access to it, since it gives
users access your database (!) and they can even run queries
that can really lock up your machine. I also recommend using a
JDBC connection pool whose connections are configured to only
allow SELECT queries, so that information cannot be modified
using this JSP.

log4j configurator

Allows you to modify your log4j configuration while your
server is running. Change logger or appander settings, as well as
test the logger right from a web page.