Getting the Software#
Download the latest distribution of iClassified from ???????Deploying the Application#
Once you have obtained the distribution the following steps are required:- Deploy the .war file to the application server
- Create the database
- Configure the application server
Deploying the .war File#
For most application servers all that is involved in deploying the war file is placing iclassified.war in the server's web application directory. Some servers offer web based configuration tools that perform this process. Different web hosts will also have their own requirements. Consult your application server or web host documentation for more details.The sections below detail this step for particular application servers:
Tomcat#
Place iclassified.war in the TOMCAT_HOME/webapps directory.Creating the database#
iClassified should work with any database supported by the Hibernate object relational mapping framework. For a list of currently supported databases see (). iClassified requires the following:- An empty database instance
- A configured user that has all of the privileges required to create tables in the database
Consult your database documentation for help on creating a database.
Configuring the Application Server#
iClassified requires the following in order to talk to the database:- Access to the JDBC drivers for your database in the application server's classpath
- A JNDI data source defining the connection parameters for the database. This data source should be configured at the location: java:/comp/env/jdbc/iclassifieddb
- A JNDI environment entry telling the underlying database framework (Hibernate) what sort of database is being used. This value should be configured at the location: java:/comp/env/dialect. A comprehensive list of possible values for this property can be found at www.hibernate.org/hib_docs/v3/api/org/hibernate/dialect/package-summary.html
The more common ones are shown below:
| Database | Value |
|---|---|
| DB2 | org.hibernate.dialect.DB2Dialect |
| HypersonicSQL | org.hibernate.dialect.HSQLDialect |
| Informix | org.hibernate.dialect.InformixDialect |
| Ingres | org.hibernate.dialect.IngresDialect |
| Interbase | org.hibernate.dialect.InterbaseDialect |
| Pointbase | org.hibernate.dialect.PointbaseDialect |
| PostgreSQL | org.hibernate.dialect.PostgreSQLDialect |
| Mckoi SQL | org.hibernate.dialect.MckoiDialect |
| Microsoft SQL Server | org.hibernate.dialect.SQLServerDialect |
| MySQL | org.hibernate.dialect.MySQLDialect |
| Oracle (any version) | org.hibernate.dialect.OracleDialect |
| Oracle 9 | org.hibernate.dialect.Oracle9Dialect |
| Progress | org.hibernate.dialect.ProgressDialect |
| FrontBase | org.hibernate.dialect.FrontbaseDialect |
| SAP DB | org.hibernate.dialect.SAPDBDialect |
| Sybase | org.hibernate.dialect.SybaseDialect |
| Sybase Anywhere | org.hibernate.dialect.SybaseAnywhereDialect |
Most application servers provide a JNDI environment and a means of configuring items to be placed into JNDI. Consult your application server's documentation for more details.
The following will serve as a guide for particular application servers:
Tomcat#
The documentation for configuring JNDI resources into Tomcat 6.x can be found here
. Perform the following steps:
- Add the following to the <globalNamingResources> section of server.xml: <Resource auth="Container" driverClassName="driver name" maxActive="8" maxIdle="4" name="jdbc/iclassifieddb" password="password" type="javax.sql.DataSource" url="jdbc url" username="username" /> where driver name is the fully qualified name of the jdbc driver class; username is the database user login; password is the database user password and url is the JDBC URL used to connect to your database. Consult your database documentation for the name of the driver class and the correct URL format. Adjust the maxActive and maxIdle parameters to suit the anticipated load on the site. For example an HSQLDB instance running on the local machine with the default userid and password would use the following configuration: <Resource auth="Container" driverClassName="org.hsqldb.jdbcDriver" maxActive="8" maxIdle="4" name="jdbc/iclassifieddb" password="" type="javax.sql.DataSource" url="jdbc:hsqldb:hsql://localhost:9001/iclassified" username="sa" />
- Create a <context> section inside the appropriate <host> tag in server.xml to reference the application. The following should serve as a guide: <Context docBase="iclassified" path="/iclassified" reloadable="true"> <ResourceLink name="jdbc/iclassifieddb" global="jdbc/iclassifieddb" type="javax.sql.DataSource"/> <Environment name="dialect" value="dialect value" type="java.lang.String" override="false"/> </Context> where dialect value is one of the values shown above. For example for an HSQLDB database the context would look like the following:
<Context docBase="iclassified" path="/iclassified" reloadable="true">
<ResourceLink name="jdbc/iclassifieddb" global="jdbc/iclassifieddb" type="javax.sql.DataSource"/>
<Environment name="dialect" value="org.hibernate.dialect.HSQLDialect"
type="java.lang.String" override="false"/>
</Context>
or for MySQL database it would look like the following:
<Context docBase="iclassified" path="/iclassified" reloadable="true">
<ResourceLink name="jdbc/iclassifieddb" global="jdbc/iclassifieddb" type="javax.sql.DataSource"/>
<Environment name="dialect" value="org.hibernate.dialect.MySQLDialect"
type="java.lang.String" override="false"/>
</Context>
- Place the appropriate JDBC driver jar for your database in TOMCAT_HOME/lib
Site Configuration#
Start the application server. At this point a number of tables should be created in the database. If they are not check the database connection parameters for your application server. If the tables have been created you should be able to navigate in a browser to http://your.server.com/iclassified (where your.server.com is the address of your application server) and perform the following configuration steps:Creating the Administrator#
The first page you should see when accessing the site is the administrator configuration page. Enter the details for the administrator login (and record them somewhere!). After registering click the login link to log the administrator in.Setting Site Parameters#
See Editing the Site ConfigurationChanging the Look and Feel#
iClassified has been designed to allow customization of the look and feel using the inclusion of an external CSS stylesheet. Each page in the application loads a stylesheet defined by the stylesheet URL setting in the site configuration properties. In order to customize the look and feel use the administrator account to edit this value. Use the URL of a .css file that has been placed on a web server or on the file system of the machine running the application server. The default stylesheet can be obtained from the path /iclassified/styles.main.css. For more information on the style conventions used in iClassified see Customizing The Look And FeelTroubleshooting#
Application fails to start on Tomcat#
If you get an exception like the following in the Tomcat logs:18/04/2009 5:36:33 PM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter struts2 java.lang.NullPointerException at com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209) at com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(FileManager.java:60) ...Try installing Tomcat in a directory without spaces. See this struts 2 issue
for further details
Add new attachment
Only authorized users are allowed to upload new attachments.
«
This page (revision-33) was last changed on 12-May-2009 00:31 by Administrator