alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  
<td>mysql </tr> <tr class="fields"> <td align="center">PostgreSQL <td>postgresql </tr> <tr class="fields"> <td align="center">HSQLDB <td>hsqldb </tr> <tr class="fields"> <td align="center">Oracle <td>oracle </tr> </table> </tr> </table> <p>The default value is mysql, which means JForum will try to use MySQL. Note that the value should be in lowercase.

<p>Next, you can tell JForum whether to use a Connection Pool or not. A connection pool will increase the performance of your application, but there are some situations where the use of a connection pool is not recommended or even possible, so you can change it according to your needs.

<p>By default JForum uses a connection pool, option which is specified by the key database.connection.implementation. The following table shows the possible values for this key:

<table align="center"> <tr> <td>

jforum example source code file (install_no_wizard.jsp)

This example jforum source code file (install_no_wizard.jsp) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - jforum tags/keywords

connections, downloading, if, jforum, jforum, key, mysql, mysql, the, the, this, this, to, you

The jforum install_no_wizard.jsp source code

<jsp:include page="header.jsp"/>

<!-- InstanceBeginEditable name="MainContent" -->
<div style="padding:0px 10px">
	<img src="images/bt_manual_install.gif">
		<div>
<p>Here will be shown how to manually configure and install JForum. It is assumed that the you has some knowledge on how to install / configure a Java servlet Container ( or already has one up and running ), and the database is properly configured.

<p>For automated installation, check the Installation & configuration - Wizard section.

<p>Note: These instructions are for the installation of JForum, release version 2.1.8. Some of the steps here described may not be valid for older versions, which are no longer supported. </p> <!-- Downloading --> <div class="blue-title">Downloading JForum <div> <p>To get JForum, go to the download page and get the latest version.

<!-- Unpacking --> <div class="blue-title">Unpacking <div> <p> After the download, unpack the .ZIP file into your webapp's directory (or anyplace you want to put it). A directory named <i>JForum-<release> will be created, where <release> is the version, which may be "2.0", "2.1.7" etc... this it just for easy version identification.

<p> You can rename the directory if you want. The next step you should do is register the JForum application within your Servlet Container, like <a href="http://jakarta.apache.org/tomcat" class="blue">Tomcat. This document will use the context name "jforum", but of course you can use any name you want.

<!-- Directory permissions --> <div class="blue-title">Directory permissions <div> <p> JForum expects that some directories are writable by the webserver. Before you start installing, please check if the following directories, and their sub-directories, exist and have full write permissions: <ul> <li>upload <li>tmp <li>images <li>WEB-INF/config <li>WEB-INF/jforumLuceneIndex </ul> </p> <!-- Configuring --> <!-- Downloading --> <div class="blue-title">Database configuration <div> <p>First of all, you must have MySQL, Oracle or PostgreSQL installed and properly configured. <a href="http://www.hsqldb.org">HSQLDB is supported as well, and has built-in support, so you don't need to download it (eg, it is an embedded database).

<p>Open the file WEB-INF/config/SystemGlobals.properties. Now search for a key named database.driver.name and configure it according to the following table:

<table align="center"> <tr> <td> <table bgcolor="#3aa315" cellspacing="2" width="70%" align="center"> <tr> <th class="th-header">Database <th class="th-header">Key value </tr> <tr class="fields"> <td align="center">MySQL
<tr> <th class="th-header">Connection Storage Type <th class="th-header">Key value </tr> <tr class="fields"> <td align="center">Pooled Connections <td>net.jforum.PooledConnection </tr> <tr class="fields"> <td align="center">Simple Connections <td>net.jforum.SimpleConnection </tr> <tr class="fields"> <td align="center">DataSource Connections <td>net.jforum.DataSourceConnection </tr> </table> </tr> </table> <p>If you have chosen net.jforum.DataSourceConnection, then set the name of the datasource in key database.datasource.name, and ignore the table below. Otherwise, do the following steps:

<p>Edit the file WEB-INF/config/database/<DBNAME>/<DBNAME>.properties, where <DBNAME> is the database name you are using - for instance, mysql, postgresql or hsqldb. In this file there are some options you should change, according to the table below:

<table align="center"> <tr> <td>
<tr> <th class="th-header">Key Name <th class="th-header">key Value description </tr> <tr class="fields"> <td align="center">database.connection.username <td>Database username </tr> <tr class="fields"> <td align="center">database.connection.password <td>Database password </tr> <tr class="fields"> <td align="center">database.connection.host <td>The host where the database is located </tr> <tr class="fields"> <td align="center">dbname <td>The database name. The default value is jforum. All JForum tables are preceded by "jforum_", so you don't need to worry about conflicting table names. </tr> </table> </tr> </table> <p>The other properties you may leave with the default values if you don't know what to put.

<div class="blue-title">Note for MySQL users <div> If you're going to use MySQL 4.1 or newer, please pay attention to the fact that starting from this version (the mysql version, not JForum) many architectural changes were made. By default, now the system runs using the UTF-8 character set (previous versions lack support for it), and it may result in some problems depending the way you configured JForum to connect to MySQL. Regular installations will opt to use unicode and UTF-8 as character encoding, but, when using MySQL 4.1+, you shoudl avoid id. To do that, open the file mysql.properties and change the value of the keys "mysql.encoding" and "mysql.unicode" to empty (eg, mysql.unicode= ). <div class="blue-title">Creating the database tables <div> The next step is to create the tables. To do that, use the import script named "<DBNAME>_db_struct.sql", placed at WEB-INF/config/database/<DBNAME>. This script will create all necessary tables to run JForum. The script were tested and should work with no problem at all. Also, please keep in mind that if you are upgrading JForum you need to take a look to see if a migration script exists. Look in the file named "Readme.txt" in the root directory to see. <div class="blue-title">Populating the tables <div> Now it is time to run the script to populate the database tables. To do that, use the script named "<DBNAME>_data_dump.sql", also located at WEB-INF/config/database/<DBNAME>. One more time, you should have no problems with this step. If you do, please remember to inform the error message, as well the database name and version you're using. <div class="blue-title">General configuration <div> The main configuration file for JForum is <i>WEB-INF/config/SystemGlobals.properties. The file is well documented, and you certainly will want to change some of the settings there, like forum's URL, name, description, location of some directories and etc. <div class="blue-title">Security Information and Considerations <div> <li class="style1">Remove the line "install = net.jforum.view.install.InstallAction" from the file WEB-INF/config/modulesMapping.properties <li>JForum uses a servlet mapping to invoke the pages. This mapping is *.page, and is already properly configured at WEB-INF/web.xml. If you are running JForum on a ISPs which have Apache HTTPD in front of Tomcat, you may need to contact their Technical Support and ask them to explicity enable the mapping for you. <li>The directory "images", "tmp", "upload" and "WEB-INF" ( and their sub-directories ) should have write permission to the user who runs the web server. You'll get nasty exceptions if there is no write permission. In the same way, if you're going to use the file attachments support, the directoy you'd chosen to store the files ("uploads" by default) should also be writable. <li>The administration interface is accessible via the link Admin Control Panel, located in the bottom of the main page. You will only see this link if you are logged as Administrator. See above the default password for the admin user: <br>
The username is Admin and the password is admin </li> <li>This step is HIGHLY recommended: Open the file WEB-INF/config/SystemGlobals.properties and search for a key named user.hash.sequence. There is already a default value to the key, but is VERY RECOMMENDED that you change the value. It may be anything, and you won't need to remember the value. You can just change one or other char, insert some more... just type there some numbers and random characters, and then save the file. This value will be used to enhance the security of your JForum installation, and you will just need to do this step once. </div> <!-- InstanceEndEditable --> <jsp:include page="bottom.jsp"/>

Other jforum examples (source code examples)

Here is a short list of links related to this jforum install_no_wizard.jsp source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.