...
1.Download and install the most recent stable version of Tomcat 5.5. You can find it here:
http://tomcat.apache.org/download-55.cgi
2.Download the most recent official release of Derby from here: http://db.apache.org/derby/index.html.
The only file you'll need from this download is derby.jar
3.Stop Tomcat
4.Copy derby.jar (from the derby distribution) to Tomcat_Home/common/lib
5.Add the sample war file to Tomcat_Home/webapps
a.sample-companyweb-xxx.war (e.g. "sample-companyweb-1.0-incubator-M2.war")
6.Install the canned Derby database to Tomcat:
a.First, create a new directory named "Databases" to hold the sample database.Create
Create Tomcat_Home / Databases
b.Copy the dastest folder (and all its contents) from _build directory root OR where samples where here
unzipped_/java/das/samples/companyweb to Tomcat_Home/Databases.
- NOTE:
If you are running this from a sample distribution, the canned database is available in the
distribution, inside the databases directory.
7.Define a DataSource by adding a datasource definition to Tomcat_Home/conf/server.xml.
a.Find the end-of-section marker </GlobalNamingResources> and add the following lines just above it:
No Format |
---|
<!-- Global Datasource for Derby dastest database --> <Resource name="jdbc/dastest" type="javax.sql.DataSource" auth="Container" description="Derby database for DAS Company sample" maxActive="100" maxIdle="30" maxWait="10000" username="" password="" driverClassName="org.apache.derby.jdbc.EmbeddedDriver" url="jdbc:derby:{absolute path}Databases/dastest"/> |
- Requirement: You must include the absolute path to the "Databases" directory in the above url
attribute. Fore example:
url="jdbc:derby:c:\apache-tomcat-5.5.17\Databases/dastest"/>
...