Getting the examples
The examples are included as a WAR file in the binary distribution of Castor Taglibs here
, and are also built as a part of the
You will certainly have to make some changes in either case in order to run the examples. In the instance of the WAR file you will need to decompress it with the JAR utility and make changes to the configuration files. In the case of building from source, all the configurations can be edited in the /etc directory. Details of the changes are in the sub-sections below. Building the database
If you wish to use Ant to build the database, first create a blank database and a user with all permissions for that database. Next, edit the database target in the build.xml file to match your system (correct JDBC, driver, url, user, database and password). Once this is correct, type
Alternatively, simple execute the file in etc/sql/database.sql with your preferred RDBMS management utility. Configuring the applicationTo run the application, you will need to change the following files. domain.xmlYou will need to change the JDBC XADatasource configuration to match your system. Refer to the Tyrex website for more information about configuring Tyrex. database.xmlYou will need to change the Castor database.xml configuration in etc/castor to use the correct datasource in your servlet container. Refer to the Castor documentation for more information. mapping.xmlYou may need to change the Castor mapping.xml if you are using a different RDBMS from Postgres 7.2. Note that the example uses PostgreSQl sequences to generate identity fields, and this is not supported by other RDBMS. Refer to the Castor documentation for more information. server.xmlYou may need to change the Tomcat server.xml if you
Refer to the Tomcat documentation for more information. |