Internet Shop in Ajax: Difference between revisions

From Elvanör's Technical Wiki
Jump to navigation Jump to search
Line 3: Line 3:
== Configuring Tomcat in order to deploy the web application ==
== Configuring Tomcat in order to deploy the web application ==


* Logging must be configured through log4j. A sample log4j.properties file is present in the doc/ directory of the project. Edit it and copy it to {CATALINA_HOME}/common/classes/ log4j.properties.
* Logging must be configured through log4j. A sample log4j.properties file is present in the doc/ directory of the project. Edit it and copy it to {CATALINA_HOME}/common/classes/ log4j.properties. Also install the log4j.jar file (see below).




Line 10: Line 10:
** Hibernate library (hibernate3.jar)
** Hibernate library (hibernate3.jar)
** MySQL JDBC driver (jdbc-mysql.jar)
** MySQL JDBC driver (jdbc-mysql.jar)
** Log4j logging library (log4j.jar) - this is not strictly required as Tomcat can use JDK logging, but log4j is highly recommended


* In addition, you may also have to add the following libraries, which seem to be dependencies of Hibernate:
* In addition, you may also have to add the following libraries, which seem to be dependencies of Hibernate:
Line 15: Line 16:
** Code Generation Library (cglib-nodep.jar). If you use the version with dependencies (cglib.jar), you will have to add additional libraries required by cglib (see below)
** Code Generation Library (cglib-nodep.jar). If you use the version with dependencies (cglib.jar), you will have to add additional libraries required by cglib (see below)
** Java Transaction API (jta.jar)
** Java Transaction API (jta.jar)
** Another Tool for Language Recognition (antlr.jar)


* Code Generation Library Dependencies (incomplete):
* Code Generation Library Dependencies (incomplete):

Revision as of 15:59, 21 March 2007

Ajax Shop Project.

Configuring Tomcat in order to deploy the web application

  • Logging must be configured through log4j. A sample log4j.properties file is present in the doc/ directory of the project. Edit it and copy it to {CATALINA_HOME}/common/classes/ log4j.properties. Also install the log4j.jar file (see below).


  • The following libraries (JAR files) are needed (place them in WEB-INF/lib in your webapp directory, or in the shared/lib directory):
    • GWT servlet library (gwt-servlet.jar)
    • Hibernate library (hibernate3.jar)
    • MySQL JDBC driver (jdbc-mysql.jar)
    • Log4j logging library (log4j.jar) - this is not strictly required as Tomcat can use JDK logging, but log4j is highly recommended
  • In addition, you may also have to add the following libraries, which seem to be dependencies of Hibernate:
    • DOM4J library (dom4j.jar)
    • Code Generation Library (cglib-nodep.jar). If you use the version with dependencies (cglib.jar), you will have to add additional libraries required by cglib (see below)
    • Java Transaction API (jta.jar)
    • Another Tool for Language Recognition (antlr.jar)
  • Code Generation Library Dependencies (incomplete):
    • ASM (many JARs, depending on the version of ASM chosen)

Important Note: Since they are JAR files, put them in lib/, not classes/ !

Note: Under Gentoo, it is recommended to install all these packages using Portage. Then create symlinks from the Tomcat directories to the actual JARs.


  • You must create the "Shop" database under MySQL. This database will be used by Hibernate.

SQL Tables

ShopItem

  • ID
  • ShopID
  • Price
  • Name
  • Auction / Sale
  • Image
  • Description
  • Status
  • DateEntered

ShopCategory

  • ShopID
  • Name
  • ID
  • Subcategory (boolean)