This is a Java servlet implements message board. Board supports e-mail notification and WAP/WML clients.
Each board supports file based persistence - your data will be saved in the flat file (files) or database based persistence. See below how to define this option.
How to use it:
a) copy messageBoardPackage.jar into your WEB-INF/lib
c) describe a mapping for servlets in web.xml file:
For each your board you must provide a configuration file describes how to save messages as well as various interface settings. You can use MessageBoard (or AdminBoard) in two forms.
a) pass configuration file as a parameter. E.g.:
b) define your configuration file as an initial parameter for servlet
(parameter name is config):
and use servlet in this form: http://your_host/servlet/MessageBoard
Configuration file is a text file, each line describes one parameter in the form of
Empty lines and any line starts with # or // are ignored.
Current version supports the following list of parameters:
# base directory, this parameter must be set
# JNDI name (instead of the above mentioned pair)
# Optional parameter: user name for JDBC connection. You can omit this parameter.
# name of the table
# Directory for uploaded files. If you set this parameter
# board title (default value is empty - no title)
# CSS Style (URL for your file)
# background (default value is #FFFFFF)
# foreground color (default value is #000000)
# even messages background. Default value is #F7F7F7
#font size (by default is current browser's font)
#font face (by default is current browser's font)
# offset. By default board will use server's time (offset=0). You can
# sort titles (creation time): 1 - last to first, 0 - first to last (default value is 1)
# sort messages (posting time): 1 - last to first, 0 - first to last (default value is 0)
# refresh time in seconds (default value is 600)
# enable/disable post messages. By default this parameter is empty
# page size in messages (default value is 10)
# header. You can set here some file contains any html-code. This code
# footer. You can set here some file contains any html-code. This code
# Date format. By default board will use full date.
# ask email: ask/do not ask email field for posted messages.
# ask URL: ask/do not ask URL field for posted messages.
# localization support. You can set character encoding for input parameters
# localization support. You can directly describe charset
#Password for administrator. Will be used in AdminBoard servlet.
# smtp port. By default is 25
# smtp host
# your mail domain
# from address. Address 'From' for notification letters
# to address. Notification will be emailed to any user
You can save config file anywhere on your server. Just use the
proper path for setting servlet's parameter. Short path (just name of the
file) means that your configuration file is saved under servletrunner's
root directory. But you can always use some like this:
Also the base directory for messages store can be created at the any place on your server (just check out access rights).
You can describe your own CSS styles for message board. Use the following classes:
message - CSS styles for textarea input
More about database persistence
All data will be saved in the one table. Name of this table is included
in your configuration file (table=your_table). So if you support several
calendars each of them has got own table (probably in the same database).
Table must be created before the first use of servlet with the appropriate
configuration file. Use your database admin tools for doing this. Here
is a DDL statement for this table:
CREATE TABLE your_table_name (
Id CHAR(30) PRIMARY KEY,
Msg LONG VARCHAR
You must use the same names for columns but depends on your database you can change the type for the column (Msg). This column (domain) will keep text data for individual messages. You may decide to use TEXT for example. Check out your DB manual for supported SQL data types.
Domain Moment will keep time stamp for messages (in milliseconds). We used type CHAR just for the compatibility with JDBC-ODBC bridges. You may also change types from CHAR to VARCHAR.
Note: evaluation version displays only first three pages for the each thread.
For downloading: messageBoardPackage.jar
Sample of config file: mbconf
See also JSOS - the largest collection of servlets and filters.
Also in JSOS: