Installing the Books for Geeks Example in Linux

I l @ ve RuBoard

  1. Follow the instructions in the previous two appendixes to install JDK, Ant, Tomcat, MySQL, and MM.MySQL for your appropriate operating system.

  2. Go to http://jakarta.apache.org/log4j/jakarta-log4j-1.1.3.zip, open the archive using WinZip, and extract the archive to /tmp/log4j. Find the dist/lib subdirectory, and copy log4j.jar to /var/tomcat4/lib.

  3. Go to http://jakarta.apache.org/builds/jakarta- turbine /alpha/3.0a4/, click tdk-3.0a4.zip , and open the archive extract to /tmp . Copy velocity-1.2-dev.jar and turbine-2.1.jar from the share/lib subdirectory to /var/tomcat4/lib . Be sure that you do not use the 3.0a5 release because it doesn't have the turbine-2.1.jar file in it.

  4. Unzip the CARTAPP zip file into /tmp .

  5. Open an editor in /tmp/CARTAPP/bfg/build.xml and change the definition of tomcatdir to /var/tomcat4 .

  6. Do an ant dist in the /tmp/CARTAPP/bfg directory.

  7. Edit the server.xml file in /var/tomcat4/conf/ , adding the following:

     <! BFG Context > <Context path="/bfg" docBase="bfg" debug="0"          reloadable="true">   <Environment name="maxExemptions" type="java.lang.Integer"               value="15"/>   <Parameter name="context.param.name" value="context.param.value"              override="false"/>   <Resource name="mail/session" auth="CONTAINER"             type="javax.mail.Session"/>   <ResourceParams name="mail/session">     <parameter>       <name>mail.smtp.host</name>       <value>192.168.1.1</value>     </parameter>   </ResourceParams> </Context> 
  8. Change 192.168.1.1 to your SMTP mail server.

  9. Stop Tomcat, if it's running, and restart it ( enter the command /etc/init.d/tomcat4 stop , wait 30 seconds, and then enter /etc/init.d/tomcat4 start as root.)

  10. cd to /tmp/CARTAPP/sql/bfg .

  11. Run database_create.sh . If you've set a root password (which you should have) for MySQL, you'll have to type it several times.

  12. Set your browser to http://localhost:8180/bfg/jsp , and you should see the application running. If not, check to make sure that Tomcat is running properly by going to the base Tomcat index page.

I l @ ve RuBoard


MySQL and JSP Web Applications. Data-Driven Programming Using Tomcat and MySQL
MySQL and JSP Web Applications: Data-Driven Programming Using Tomcat and MySQL
ISBN: 0672323095
EAN: 2147483647
Year: 2002
Pages: 203
Authors: James Turner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net