Page generated by DBPages System on Oracle Database writed in PL/SQL
Authors: Piotr Różnicki, Andrzej Kałuża
Short instruction
Into Apache Tomcat 6.x lib folder put below jars:
- ojdbc6.jar (or compatible)
- activation.jar
- commons-fileupload-1.2.1.jar
- commons-io-1.4.jar
- mail.jar
Create user DBPAGES with password DBPAGES in Oracle database
Call dbpages.zip/oracle/ORACLE.SQL script by oracle sqlplus on created user.
Into Apache Tomcat 6.x webapps folder put content of dbpages.zip/oracle/tomcat-webapps
Configure files config.properties, context.xml and web.xml explained below.
In web browser go to http://host:port/dbpages/http_help.home
CREATE TABLE HTTP_MAIL(
NMAL NUMBER NOT NULL ENABLE,
RECIPIENT VARCHAR2(4000) NOT NULL ENABLE,
MESSAGE CLOB,
SUBJECT VARCHAR2(1000),
CREATED TIMESTAMP DEFAULT sysdate,
UPDATED TIMESTAMP,
STATE VARCHAR2(1) DEFAULT 'N' NOT NULL ENABLE,
CONSTRAINT HTTP_MAIL_PK PRIMARY KEY (NMAL) ENABLE
)
/
CREATE INDEX HTTP_MAIL_STATE_I ON HTTP_MAIL (STATE)
/
Send email
Config file (config.properties in %PROJECT_DIR%/WEB-INF/classes directory):
# Configuration file of DBPAGES System
#connection - DB connection name configured for Application Context
connection = db
#useCompress - compress pages (true/false)
useCompress = false
#useSecureConnection - allow only
useSecureConnection = false
# startup - startup prodecure
startup = http_help.home
# beforeSession - procedure fired before set session variables
beforeSession =
# beforePage - procedure fired before generating page
beforePage =
# afterPage - procedure fired after generating page
afterPage =
# afterSession - procedure fired after all operations width page
afterSession = http.reset
# allowedProcedures - list of procedures that user can run
# * means all procedures accesible to database user application is logged in.
allowedProcedures = *
# procedures for download binary files
downloadProcs = http.process_download
# procedures to upload binary files
uploadProcs = http.process_upload
#packageName - name of dbpages package or schema. For Oracle, Microsoft SQLServer database http, for MySQL leave empty.
packageName = http
#namedParams - set to true if DB engine uses named parameters (eg. Oracle, Microsoft SQL Server)
namedParams = true
#charset - charset for output
charset = utf-8
#smtpHost - hostname of smtp server
smtpHost = smtp.server.pl
#smtpUser - username of smtp server
smtpUser = user@server.pl
#smtpPasswd - password of smtp server
smtpPasswd = password
# email address for sending emails
smtpFrom = user@server.pl
# turno on/off debug mode, extended info put into STDOUT log
#debug=true
Apache Tomcat 6.x context file (context.xml in %PROJECT_DIR%/META-INF directory):
Resource name="db" is the connection parameter name from config file