Posts Tagged 'Setup&'

Nov

15

Setup blojsom

Posted by admin under resource, technology - No Comments
  • Download the blojsom 3.0 blojsom.war file.
  • Create a web application directory for the blojsom 3.0 WAR file in %TOMCAT_HOME%/webapps.

    % mkdir blojsom

  • Copy the blojsom.war file into the %TOMCAT_HOME%/webapps/blojsom directory.
  • Unpack the blojsom.war file.

    jar xvf blojsom.war

  • Delete the blojsom.war file.

Install the MySQL Database Driver

  • After unpacking the MySQL JDBC Driver, copy the mysql-connector-java-3.1.12-bin.jar (or appropriate version) file to %TOMCAT_HOME%/common/lib.

Configure blojsom’s Database Settings

  • Edit %TOMCAT_HOME%/webapps/blojsom/WEB-INF/classes/blojsom-helper-beans-include.xml and change only the values for the username and password for your database to the username and password you created earlier.

    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
        <property name="url" value="jdbc:mysql://localhost/blojsom?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=utf-8"/>
        <property name="username" value="someuser"/>
        <property name="password" value="somepassword"/>
    </bean>
  • Edit %TOMCAT_HOME%/webapps/blojsom/WEB-INF/classes/blojsom.xml. You may need to change the value for the dbScript or detectBlojsomSQL property for your particular database. This will be noted in the database installation instructions.

    <bean id="dbloader" class="org.blojsom.util.database.DatabaseLoader" init-method="init">
        <property name="sessionFactory">
            <ref bean="hibernateSessionFactory"/>
        </property>
        <property name="dbScript" value="/WEB-INF/classes/blojsom-full-initial-data-mysql.sql"/>
        <property name="upgrading" value="false"/>
        <property name="servletConfig">
            <ref bean="servletConfigFactoryBean"/>
        </property>
        <property name="detectBlojsomSQL">
            <value>show tables;</value>
        </property>
    </bean>

Access blojsom