...| Home | Documentation...
Documentation > Apache/JServ on NT > Configuration >
Overview > Installation > Rewiew > Configuration > Credits >
+ Home ...
+ Download
> Documentation
+ DBPrism Content Management System
+ DBPrism - Apache Cocoon
+ Credits
+ Legal
 
+ Documentation
+ Frequently Asked Questions
+ Readme
+ Demos
+ Changes
+ Thigs To Do
+ Toolkits
+ JavaWebServer
+ Tomcat
+ Installing DBPrism/Cocoon2 on OC4J
+ Installing DBPrism on Cocoon2/OC4J/Linux: Introduction
+ Apache/JServ on NT
+ Resin
+ Parameters
+ Internals
 
+ links
+ Yahoo.groups
+ OTN
+ OSCOM.org
 
Moreover news
+ IBM speeds Java on mainframes (CNET Asia)
+ Middle-aged mainframe converts to Java (ZDNet UK)
+ IBM speeds Java on mainframes (ZDNet)
+ IBM speeds Java on mainframes (CNET)
+ All Buttons (JavaBoutique)
+ Drag-and-Drop Editor Out for Linux Devs (Internet News)
+ Using Program Parameters in Java (JavaBoutique)
+ Sun pledges to cooperate with Microsoft (AP via Seattle Post Intelligencer)
+ Sun pledges to cooperate with Microsoft (Boston Globe)
+ Bitter legal feud ends with payment, Sun cuts 3,300 more jobs (China Post)
+ Sun and Microsoft settle (Chicago Sun-Times)
+ Microsoft to pay $1.6 billion, settle with Sun Microsystems (Baltimore Sun)
+ Visualize Hoovers Data With Anacubis (ResearchBuzz via ResearchBuzz)
+ Sun and BEA advance Java app offerings (Computer Weekly)
+ Sun wants to lift its Java profile (ZDNet UK)
+ 'Smack the Pingu' on Your Mobile Phone! (PA News via The Scotsman Online)
+ Third Generation Mobile Phone Game from Nihon Enterprise (Japan Corp)
+ Comment: Free but shackled - the Java trap (Sydney Morning Herald)
+ Sun plots Java comeback (CNET Asia)
+ Veritas and BEA vow to love Java together (The Register)
+ Microsoft and Sun's settlement will yield web services benefits and support for Java (Computer Weekly)
+ Sun plots Java comeback (CNET)
+ Sun plots Java comeback (ZDNet)
+ Sun enables new wave of mobile Java services (Sunday Times South Africa)
+ Sun Releases Sun Java Studio 6 (Techfocus)
+ Sam Pitrodas Telecom Firm Sets Up India Centre (Financial Express)
+ Multi Player Mobile Gaming (BBC)
+ Combining SOAP and JavaMail (Java Pro)
+ Draw Applet (JavaBoutique)
+ IBM dedicates module to Java on mainframes (CNET)
 
+ OTN News
+ View Live Customer Webcast Demos of Enterprise Manager 10g Grid Control
+ Oracle Database 10g for Windows Now Available for Download
+ Download New Oracle 10g JDBC Drivers
+ JDeveloper 10g Reviewed in Internet.com's Java Boutique
+ Java Developer's Journal Readers Name Oracle Products "Best" in Two Categories
+ New OracleAS Portal Extension for Macromedia Dreamweaver
+ Learn from the Experts During Java Week
+ Download Oracle Database 10g
+ New OracleAS Web Cache How-To Documents
+ Learn About SQL 2003 Support in Oracle Database 10g
+ New: Quick Installation Guide for RAC on Oracle Database 10g SE (Windows)
+ Oracle Forms Diagnostic Techniques
+ Introduction to JavaServer Faces
+ Prepare for Oracle Database 10g
+ New Tutorial: Learn JSP 2.0
+ Learn Best Practices for Consolidating Oracle on Linux Deployments
+ What's New in PL/SQL in Oracle Database 10g?
+ New Oracle 10g JDBC Samples
+ New Tech Tip: Using HttpUnit in Oracle JDeveloper 10g
+ Oracle 10g Supports Microsoft Windows Media Streaming Services and Windows Media File Format (ASF)
+ New Books at Oracle 10g Book Center
+ Tech Tip: Using JSTL SQL in Oracle JDeveloper 10g Preview
+ New Technical Article Series: The Hitchhiker's Guide to PHP
+ New Enterprise Manager 10g Grid Control Hands-on Tutorial
+ OC4J 10g (10.0.3) Developer Preview 2 Now Available
+ Download the New Oracle JDeveloper Application Migration Assistant (AMA) Search Rules for WebLogic Migrations
+ Learn Oracle in 2 Days
+ Download the new Oracle XDK 10g Production Release
+ Explore New JDBC 10g How-To's
+ New Oracle 10g JDBC Sample: CachedRowSet
+ New RowSet Implementation Tutorial Series
+ Download 2003 ODTUG Conference Papers
+ New Tutorial: Understanding TLD Caching in JSPs
+ Deploy the New J2EE 1.4 Adventure Builder Reference Application to OC4J
+ Download New Servlet Advanced Sample Applications
+ New: Oracle XDK 10g Unicode Support and XSLT Extension Sample App
+ New Oracle Application Server ProcessConnect End-to-End Samples
DBPrism at SourceForge
Built with Cocoon2
Documentation
 
5. Configuration

Lets assume I want to set up an url that looks like this http://127.0.0.1/dev/plsql/hw, where hw is the name of a stored procedure (ah familiar territory for those coming from the oracle database world)


5.1 Configure Apache

Leave httpd.conf alone there is no need to add any configuration data here. Just needed to mention it the documentation is very extensive. (and you have the documentation installed for both apache and jserv locally)


5.2 Configure Jserv
5.2.1

We need to modify jserv.conf (sometimes called mod_jserv.conf depending on your platform) to mount the zones we require (the jserv.conf file contains directives to the httpd processes (ie apache) on how to handle the requests. So when we configure jserv.conf we are in fact configuring apache on how to process certain requests.


5.2.2

This is an extension of mapping virtual paths to actual physical directories, or executing cgi scripts or processing files of a certain extension in a particular way (.xml for example). For jserv apache passes the request to the servlet engine.


5.2.3

Edit the file c:\program files\apache group\Apache JServ 1.1\conf\jserv.conf, find the directive ApjServMount there could be 2 zones already mounted for demos

ApJServMount /servlets /root
ApJServMount /servlet /root


Replace these lines with

#ApJServMount /servlets /root
#ApJServMount /servlet /root
ApjServMount  /dev /devzone


You do not need to comment out the root zone demo servlet and servlets, but KISS again
This tells apache that requests to /dev/***** should be passed to jserv



5.3 Configure Servlet Engine

Edit the file c:\program files\apache group\Apache JServ 1.1\conf\jserv.properties

5.3.1

This file has a number of notable lines
The following lines tell jserv where the jre is

wrapper.bin=c:\program files\apache group\jdk1.1.8\bin\java.exe


The following lines tell jserv about needed jar files namely

wrapper.classpath=c:\program files\apache group\Apache JServ 1.1\ApacheJServ.jar
wrapper.classpath=c:\program files\apache group\jsdk2.0\lib\jsdk.jar


Now you know why the installation kept prompting us for directories, it did some configuration for us. Its the same as a class path environment variable
You can add additional jars and zip files as needed.

NoteAny jar or zip added here will be available to all zones, there is a way, as we will see later to add jar files for specific zones. Does it matter? Well yes from a security standpoint but also from a development standpoint. Any jar added here will be loaded once on startup of apache, if we add the jar to the zone it is reloaded when changed. Not a big deal on your own machine but something to keep in mind for later.


5.3.2 Add jdbc drivers

Just under the line

wrapper.classpath=c:\program files\apache group\jsdk2.0\lib\jsdk.jar


add the lines

Note oracle jdbc drivers the oracle home is on drive D NOT C - wherever your classess111.zip file is

wrapper.classpath=d:\ORANT\jdbc\lib\classes111.zip

Note Notice we have not added the Prism.jar file we will do that in the zone.


5.3.3 Declare our zones

Find the line

zones=root


and replace it with (to declare a zone names devzone)

#zones=root
zones=devzone


So now the servlet engine (jserv) knows all about our zones, no wait there is more, each zone has a configuration


5.3.4 Zone configuration files

Find the line

root.properties=c:\program files\apache group\Apache JServ 1.1\servlets\zone.properties


and replace it with (to tell Jserv how to configure the devzone)

#root.properties=c:\program files\apache group\Apache JServ 1.1\servlets\zone.properties
devzone.properties=c:\program files\apache group\Apache JServ 1.1\servlets\dev.properties


5.4 Zone configuration

Copy

  c:\program files\apache group\prism\conf\zone.properties


to

  c:\program files\apache group\Apache JServ 1.1\servlets\dev.properties


Why bother to copy the files, 2 reasons, first Id like a clean copy of those distributed so when we go edit them we can always go back to a known starting point and secondly it keeps all the properties files in the same directory. As you become more proficient at the configuration you will see that its fairly flexible and you can come up with your own directory structures for conf files.

Edit the file c:\program files\apache group\Apache JServ 1.1\servlets\dev.properties replace the lines

repositories=/usr/local/prism/bin/Prism.jar,/usr/local/Cocoon/bin/cocoon.jar
with
repositories=c:\program files\apache group\prism\bin\prism.jar


This tells the zone to use the prism jar file
Also find the lines (at the bottom)

servlet.plsql.initArgs=properties=/usr/local/prism/conf/prism.properties
servlet.demo.initArgs=properties=/usr/local/prism/conf/prism.properties
servlet.xml.initArgs=properties=/usr/local/Cocoon/conf/cocoon.properties
servlet.xmld.initArgs=properties=/usr/local/Cocoon/conf/cocoon.properties
and replace them with
servlet.plsql.initArgs=properties=c:\program files\apache group\Apache JServ 1.1\servlets\devprism.properties
#servlet.demo.initArgs=properties=/usr/local/prism/conf/prism.properties
#servlet.xml.initArgs=properties=/usr/local/Cocoon/conf/cocoon.properties
#servlet.xmld.initArgs=properties=/usr/local/Cocoon/conf/cocoon.properties


Here I remove some examples that come with Prism, KISS again


5.5 Prism - finally we get there
5.5.1

Copy c:\program files\apache group\prism\conf\prism.properties to c:\program files\apache group\Apache JServ 1.1\servlets\devprism.properties, remember in dev.properties we pointed to this file.


5.5.2

Edit c:\program files\apache group\Apache JServ 1.1\servlets\devprism.properties
Find the following

global.webmaster=mochoa@ieee.org


Change the email address please. This is used by Prism to display an email address in the event of an error in a procedure call.

Connection string
Find the line

plsql.connectString=jdbc:oracle:thin:@cobra:1521:OI
The connectString is used to tell Prism how to go connect to the DB in the following format
plsql.connectString=jdbc:oracle:thin:@<Server Name>:<TNS Listener Port>:<Instance Name>
try
plsql.connectString=jdbc:oracle:thin:@127.0.0.1:1521:ORCL



jdbc driver

plsql.compat=8i
replace it with
plsql.compat=7x


If you are using db and jdbc drivers prior to 8.1 otherwise leave it alone

Authentication options
Find the line

plsql.DynamicLogin=false
replace it with
plsql.DynamicLogin=true


This will require you to enter the database username and password for the user whos procedure you are going to execute

Other configuration directives

plsql.toolkit=3x - use this if you have the 3.x pl/sql toolkit
plsql.toolkit=4x - use this if you have the 4.x pl/sql toolkit


5.6 PL/SQL Install

Its is assumed that the pl/sql toolkit is installed, if you dont have a copy go look its all over the web, once is at Search for XML Toolkit

5.6.1

We need one additional package, execute
c:\program files\apache group\prism\plsql\myows.sql
If you are using synonyms create a synonym.


5.6.2

As an oracle user in sql*Plus enter

create procedure HW as
begin
htp.p('Hello Non OAS World!');
end;

5.6.3

Start Apache (database and tns listener should already be up and running) and goto http://127.0.0.1/dev/plsql/hw



5.7 When things do not work

Check the various log files for error messages Sign up on the OWSKiller (aka Prism) mailing list at http://owskiller.penguin.cz/


5.8 Cocoon set up
5.8.1

Download latest cocoon release from http://xml.apache.org/


5.8.2

At the time of writing 1.7.3 was the latest, unzip the file to c:\program files\apache group\cocoon-1.7.3


5.8.3

Edit the file c:\program files\apache group\Apache JServ 1.1\conf\jserv.conf, find the line

#ApJServAction .xml /dev/org.apache.cocoon.Cocoon


Add the following lines

Action cocoon /dev/org.apache.cocoon.Cocoon
AddHandler cocoon xml
Alias /xsl/   "C:/Program Files/Apache Group/prism/xsl/"


The first part tells apache to let cocoon handle all processing for files with the extension xml, the second part is a virtual path mapping to the xsl style sheets used in the demo (the demo you are about to add)


5.8.4

Edit the file c:\program files\apache group\Apache JServ 1.1\conf\jserv.properties, add the following lines

wrapper.classpath=c:\program files\apache group\cocoon-1.7.3\bin\cocoon.jar
wrapper.classpath=c:\program files\apache group\cocoon-1.7.3\lib\xerces_1_0_3.jar
wrapper.classpath=c:\program files\apache group\cocoon-1.7.3\lib\xalan_1_0_1.jar
wrapper.classpath=c:\program files\apache group\cocoon-1.7.3\lib\fop_0_12_1.jar

NoteThe numbers 1_0_3.jar etc change with different cocoon releases


5.8.5

Edit the file c:\program files\apache group\cocoon-1.7.3\conf\cocoon.properties, add the following lines


##########################################
# Prism DB Producer params
# properties.plsql must be point to corrected prism.properties file !!!
##########################################
producer.type.db = com.prism.CocoonWrapper
producer.properties.db = c:\program files\apache group\Apache JServ 1.1\servlets\devprism.properties

##########################################
# Header Processor, set this to work with cookies, redirect url and dymamic login
##########################################
processor.type.http = com.prism.HeaderProcessor

##########################################
# Prism Excel Formatter, simple formatter to generate Excel output see PLSQL demo source for details of usage
##########################################
formatter.type.application/vnd.ms-excel = org.apache.cocoon.formatter.TextFormatter
formatter.application/vnd.ms-excel.MIME-type = application/vnd.ms-excel

# Logic Sheet for XSPConnectionWrapper
processor.xsp.logicsheet.connection.java = resource://com/prism/xsp/connection.xsl


5.8.6

Edit the file c:\program files\apache group\Apache JServ 1.1\servlets\dev.properties, Find the line

#servlet.org.apache.cocoon.Cocoon.initArgs=properties=/usr/local/Cocoon/conf/cocoon.properties


replace it with

# Do not break this line
servlet.org.apache.cocoon.Cocoon.initArgs=properties=
   c:\program files\apache group\Apache JServ 1.1\servlets\cocoon.properties


Find the line

servlet.plsql.code=com.prism.ServletWrapper


Add

servlet.demo.code=com.prism.ServletWrapper
servlet.xml.code=org.apache.cocoon.Cocoon
servlet.xmld.code=org.apache.cocoon.Cocoon


Find the line

servlet.plsql.initArgs=properties=c:\program files\apache group\Apache JServ 1.1\servlets\devprism.properties


Add

servlet.demo.initArgs=properties=c:\program files\apache group\Apache JServ 1.1\servlets\devprism.properties
servlet.xml.initArgs=properties=c:\program files\apache group\Apache JServ 1.1\servlets\cocoon.properties
servlet.xmld.initArgs=properties=c:\program files\apache group\Apache JServ 1.1\servlets\cocoon.properties


All we did here was set up demo, xml and xmld all used in the demo (the demo we will finally get to)


5.8.7

Edit the file c:\program files\apache group\Apache JServ 1.1\servlets\devprism.properties, Find the line

global.alias=plsql


Replace it with

global.alias=plsql demo xml xmld org.apache.cocoon.Cocoon


Set up 'DADs' for demo, xml and xmld (simply copy all the lines for plsql)


5.8.8

Edit c:\program files\apache group\prism\plsql\demo_bdy.sql
At the end of the file replace package initialization part with (this should have changed at prism version 1.0.1)
BEGIN
url_server := 'http://127.0.0.1';
END demo;

also replace /servlets/ with /dev/ - this needs to be done throughout the file.
Remember we never set up servlets as a zone dev was used as our mount point. I do this because I frankly feel there is something confused about calling a servlet zone servlets.


5.8.9

Log into sql (same user used to add HW procedure)
run the following scripts found in the c:\program files\apache group\prism\plsql directory

xtp.sql
or xtp_public.sql for OAS/IAS/Web DB Toolkits

demo.sql

NoteYou will also need to have the demo tables added s_inventory etc. These normally come with oracle (oci directory in a file summit2.sql) if not goto http://www.telecomrg.com/darylcollins/ get the file and run it


5.8.10

Check cocoon installed correctly
Copy the directory c:\program files\apache group\cocoon-1.7.3\samples to c:\program files\apache group\apache\htdocs\samples
Start apache
Goto http://127.0.0.1/Cocoon.xml - general status page
Goto http://127.0.0.1/samples/index.html - lots of cocoon examples
Goto http://127.0.0.1/dev/demo/demo.startup - lots of cocoon examples with prism and db connections





Overview > Installation > Rewiew > Configuration > Credits >
Last Update: 2003-08-07 09:41:57.0| webmaster@dbprism.com.ar
Search | Use AltaVista (TM) query syntax<<
Quick Links<<
(C) 2003 - DBPrism ~ DBPrism CMS | Marcelo F. Ochoa | TANDIL ~ Argentina