Section 16.3. Setup

   

16.3 Setup

There are a few things you need to make sure are in place to get the app off the ground.

  • Make sure the MYSQL database is set up.

  • Create a new context in Tomcat to run it under Tomcat. To do this, copy a folder called store into <TOMCAT_HOME>/webapps . You must fill out four key items on the Context Addition if you are using Tomcat's Administrator Web app:

    1. Doc Base: javaforcf

    2. Path : /javaforcf

    3. Working Directory: work\Standalone\localhost\javaforcf

    4. SessionID Initializer: org.apache.catalina.session.Standard-Manager

  • Then save and commit changes.

  • Restart Tomcat.

  • You must have the JSTL installed. Click taglibs and download the most recent stable version. I am using jakarta-taglibs-standard-1.0.zip . Extract it using zip or jar to your WEB-INF root in a folder called jstl10 . The web.xml file is included in the listings below.

Note

If you are modifying files and think that your changes are not being reflected, you may need to delete the generated servlet files in the work directory and then restart. This forces Tomcat to recreate the servlets.


If you want to manually set up Tomcat for a new Web application, then you can do so like this:

Edit tomcat4\conf\server.xml file. Under the manager entry (look for <!-- Tomcat Root Context --> ), add this entry:

 <Context path="/store" docBase="store"   debug="0" privileged="true"/> 

Then, you need to write the following files into the directories as specified in the remainder of the chapter.


   
Top


Java for ColdFusion Developers
Java for ColdFusion Developers
ISBN: 0130461806
EAN: 2147483647
Year: 2005
Pages: 206
Authors: Eben Hewitt

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