Running a JAG-generated application

Once JAG has finished its work, there are three simple steps to get your generated J2EE application up and running:

1: Build the application

JAG generated the project containing the application within the directory you specified. If you navigate to this directory you will find the 'build.xml' Ant build file.

You can build the project from within this directory: either from the command line by typing the command "ant", or from Windows Explorer by double-clicking the "build.bat"  icon.

If the build process fails (you will see the message BUILD FAILED at the end of the Ant build output), you will have to closely check the Ant build output for instructions. It is possible, for example, that you may have to set a system environment variable or add a system-specific parameter to a configuration file. In most cases the instructions will be clearly indicated in the build output.

2: Deploy the application

This is also done from the same directory: either from the command line by typing the command "ant deploy", or from Windows Explorer by double-clicking the "deploy.bat"  icon.

If it isn't already running, you must start up your application server at this point. The different application generation templates create J2EE applications for different application servers, so this step depends on which application server you are using. For example, to start up JBoss you shuld execute the run command from the <JBOSS_HOME>/bin directory.

3: Use the application


To start using the application, navigate your web browser to

http://localhost:<port number>/<application name>

For example, for a JBoss application server running on default port 8080 and an application named "testapp", the URL would be:

http://localhost:8080/testapp

The web application that is generated is naturally limited in scope, as it is intended to serve as a basis for further project development. Every entity within the application - provided it has been added to a service bean - will be accessible through the web application.

By default the basic 'CRUD' (CReate, Update, Delete) functionality is available for a given entity, as well as the ability to view navigatable lists of entities.

The generated web application offers the user the following features:

  • Validation of input fields: if you try to enter an invalid date in a date field, for example, you will be notified of the error by both a client-side JavaScript dialogue box, and by a server-side validation-error response (the invalid field's name will be highlighted in red, and an error message will be shown in the web page).
  • Drop-down select lists for relation input fields: if you choose to edit a record for an entity that has a relation to another entity, you can choose the desired related field from a select box of entity IDs.

<<Start page