These tools do not use a database. Rather, they store data in session scope, and use a number of settings in web.xml. The source code is provided, under a BSD open source license. You may alter the implementation to more closely suit your needs.
The Log Viewer is very useful for debugging. It automatically accesses the most recent log file in a directory, so it always has the most recent logging information. Repeatedly vewing the most recent entries is as simple as a browser refresh.
Features:
The assumed format of logs is that of default JDK loggers. If you have not altered the output format of JDK logging (which is usually the case), then you may use it immediately. If your log files are in a different format, then you will need to provide an implementation of LogParser. (This is not a difficult task, and you may use existing code as a guide.)
Viewing the parsed records is both more pleasing to the eye, and more flexible, since multiple criteria can be entered in a query.
Log files can always be viewed in a raw, unparsed form as well, when needed. Since the raw style does not require any parsing of log records, it is always available.
Features:
Although WEB4J does a good job of removing repeated code from your application, there are still items which are somewhat repetitive:
This tool generates 5 items: JSP fragment, Action, Model, DAO, and .sql file. It is particularly suited for generating features needing ActionTemplateListAndEdit and ActionTemplateShowAndApply.
Items are generated and displayed in plain text. In addition, settings in web.xml allow saving the generated items directly to your file system as a side-effect.
Before getting started, please review the README file inside web4j-tools.zip. Note that you must supply two jars:
There are two ways to use the WEB4J Developer Tools:
Here's an example of the first style, running web4jtools.war as a regular web application under Tomcat 5:
Here's an example of the second style of installation. It installs to C:\projects\web4jtools\, and uses Tomcat 5.
1. Unzip web4j-tools.zip to C:\projects\web4jtools\. The file structure will look like:
C:\projects\web4jtools\ codegenerator\ images\ logview\ metrics\ WEB-INF\ webmaster\ build.xml Error.jsp ...
2. Make an entry in Tomcat's [TOMCAT_HOME]\conf\server.xml file, to map the path '/web4jtools' to the source directory:
<Context path="/web4jtools" docBase="C:\projects\web4jtools" reloadable="true" > </Context>
3. Configure C:\projects\web4jtools\WEB-INF\web.xml to suit your environment.
4. Start Tomcat and navigate to (assuming the Tomcat port is 8080):
http://localhost:8080/web4jtools/If you encounter a problem, review the server logs under [TOMCAT_HOME]\logs\, and check your edits to web.xml.
5. Click on the 'Help' menu item to list hints and advice at the top of each page.